Commit ecaa99f8 authored by Stefano Bonicatti's avatar Stefano Bonicatti

Fix for new tags not loading after restart

It was missing a connection between KoResourceModel tagBoxEntryModified
event and KoTaggingResourceManager.

BUG:342541
parent d30bf131
......@@ -163,6 +163,15 @@ void KoResourceTaggingManager::syncTagBoxEntryRemoval(const QString& tag)
d->tagChooser->removeItem(tag);
}
void KoResourceTaggingManager::syncTagBoxEntries()
{
QList<QString> tags = d->model->tagNamesList();
foreach (QString tag, tags) {
d->tagChooser->insertItem(tag);
}
}
void KoResourceTaggingManager::contextAddTagToResource(KoResource* resource, const QString& tag)
{
addResourceTag(resource, tag);
......@@ -349,6 +358,8 @@ KoResourceTaggingManager::KoResourceTaggingManager(KoResourceModelBase* model, Q
this, SLOT(syncTagBoxEntryAddition(QString)));
connect(d->model, SIGNAL(tagBoxEntryRemoved(QString)),
this, SLOT(syncTagBoxEntryRemoval(QString)));
connect(d->model, SIGNAL(tagBoxEntryModified()),
this, SLOT(syncTagBoxEntries()));
/// FIXME: fix tag completer
/// d->tagCompleter = new QCompleter(this);
......
......@@ -54,6 +54,7 @@ private slots:
void contextCreateNewTag(const QString& tag);
void syncTagBoxEntryRemoval(const QString& tag);
void syncTagBoxEntryAddition(const QString& tag);
void syncTagBoxEntries();
void tagSaveButtonPressed();
void contextRemoveTagFromResource(KoResource* resource, const QString& tag);
void contextAddTagToResource(KoResource* resource, const QString& tag);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment