Commit c874860a authored by Maik Qualmann's avatar Maik Qualmann

upload patches

parent 4946f6e1
diff --git a/core/libs/tags/engine/taggingactionfactory.cpp b/core/libs/tags/engine/taggingactionfactory.cpp
index 7c74a183c3..4aa9293b6c 100644
--- a/core/libs/tags/engine/taggingactionfactory.cpp
+++ b/core/libs/tags/engine/taggingactionfactory.cpp
@@ -34,7 +34,6 @@
#include "tagscache.h"
#include "coredbaccess.h"
#include "coredb.h"
-#include "facetags.h"
namespace Digikam
{
@@ -241,9 +240,7 @@ QList<TaggingAction> TaggingActionFactory::actions() const
}
actions << newUnderParent;
- //Don't need to add top level for face tags
- if (d->parentTagId != FaceTags::personParentTag())
- actions << newToplevel;
+ actions << newToplevel;
}
else // if (createItemTopLevel && createItemTopLevel->action() == defaultAction)
{
@@ -394,7 +391,7 @@ QString TaggingActionFactory::suggestedUIString(const TaggingAction& action) con
}
else // shallCreateNewTag
{
- if (action.parentTagId() && d->parentTagId != FaceTags::personParentTag())
+ if (action.parentTagId())
{
return i18nc("Create New Tag <tag name> in <parent tag path>", "Create \"%1\" in %2",
action.newTagName(), TagsCache::instance()->tagPath(action.parentTagId(), TagsCache::NoLeadingSlash));
diff --git a/core/libs/tags/widgets/tagfolderview.cpp b/core/libs/tags/widgets/tagfolderview.cpp
index ecf960cb20..2ab64647f2 100644
--- a/core/libs/tags/widgets/tagfolderview.cpp
+++ b/core/libs/tags/widgets/tagfolderview.cpp
@@ -144,14 +144,24 @@ void TagFolderView::addCustomContextMenuActions(ContextMenuHelper& cmh, Album* a
cmh.addExportMenu();
cmh.addSeparator();
- if (tag->id() != FaceTags::unconfirmedPersonTagId() &&
- tag->id() != FaceTags::unknownPersonTagId())
+ if (d->showDeleteFaceTagsAction)
+ {
+ cmh.addActionDeleteFaceTag(tagModificationHelper(), tag);
+ cmh.addSeparator();
+ }
+ else
{
cmh.addActionDeleteTag(tagModificationHelper(), tag);
cmh.addSeparator();
- cmh.addActionEditTag(tagModificationHelper(), tag);
+ // If the tag is no face tag, add the option to set it as face tag.
+ if (!FaceTags::isPerson(tag->id()) && !tag->isRoot())
+ {
+ cmh.addActionTagToFaceTag(tagModificationHelper(), tag);
+ }
}
+ cmh.addActionEditTag(tagModificationHelper(), tag);
+
connect(&cmh, SIGNAL(signalAddNewTagFromABCMenu(QString)),
this, SLOT(slotTagNewFromABCMenu(QString)));
diff --git a/core/libs/properties/captions/itemdescedittab.cpp b/core/libs/properties/captions/itemdescedittab.cpp
index 4f4c7e01f5..74d5500e50 100644
--- a/core/libs/properties/captions/itemdescedittab.cpp
+++ b/core/libs/properties/captions/itemdescedittab.cpp
@@ -283,14 +283,11 @@ ItemDescEditTab::ItemDescEditTab(QWidget* const parent)
d->tagModel->setRootCheckable(false);
d->tagCheckView = new TagCheckView(tagsArea, d->tagModel);
d->tagCheckView->setCheckNewTags(true);
- d->tagCheckView->filteredModel()->doNotListTagsWithProperty(TagPropertyName::person());
- d->tagCheckView->filteredModel()->setFilterBehavior(AlbumFilterModel::StrictFiltering);
d->openTagMngr = new QPushButton( i18n("Open Tag Manager"));
d->newTagEdit = new AddTagsLineEdit(tagsArea);
d->newTagEdit->setSupportingTagModel(d->tagModel);
- d->newTagEdit->setFilterModel(d->tagCheckView->filteredModel());
d->newTagEdit->setTagTreeView(d->tagCheckView);
//, "ItemDescEditTabNewTagEdit",
//d->newTagEdit->setCaseSensitive(false);
diff --git a/core/libs/tags/manager/tagsmanager.cpp b/core/libs/tags/manager/tagsmanager.cpp
index b0fca1a9c9..ebab900aa7 100644
--- a/core/libs/tags/manager/tagsmanager.cpp
+++ b/core/libs/tags/manager/tagsmanager.cpp
@@ -194,9 +194,6 @@ void TagsManager::setupUi()
d->tagMngrView = new TagMngrTreeView(this, d->tagModel);
d->tagMngrView->setConfigGroup(getConfigGroup());
- d->tagMngrView->getFilterModel()->doNotListTagsWithProperty(TagPropertyName::person());
- d->tagMngrView->getFilterModel()->setFilterBehavior(AlbumFilterModel::StrictFiltering);
-
d->searchBar = new SearchTextBar(this, QLatin1String("ItemIconViewTagSearchBar"));
d->searchBar->setHighlightOnResult(true);
d->searchBar->setModel(d->tagMngrView->filteredModel(),
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