[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [digikam] /: use images without tags also as partially checked
From: Maik Qualmann <null () kde ! org>
Date: 2018-09-28 22:00:32
Message-ID: E1g60oK-00057Z-OD () code ! kde ! org
[Download RAW message or body]
Git commit a6db63a3bf8eec1c96a801808b170f5c7f775ccf by Maik Qualmann.
Committed on 28/09/2018 at 21:59.
Pushed by mqualmann into branch 'master'.
use images without tags also as partially checked
BUGS: 399153
FIXED-IN: 6.0.0
M +2 -2 NEWS
M +27 -6 core/libs/imageproperties/disjointmetadata.cpp
https://commits.kde.org/digikam/a6db63a3bf8eec1c96a801808b170f5c7f775ccf
diff --git a/NEWS b/NEWS
index 5dba04fbae..c65cc19d3e 100644
--- a/NEWS
+++ b/NEWS
@@ -600,5 +600,5 @@ BUGFIXES:
536 ==> 397808 - Digikam Mac Package crashes after resume when screen configuration \
changes. 537 ==> 399071 - "Adjust Time Date" tool shows all times as "00:00:00".
538 ==> 399134 - Progress bar or status when importing from camera/card reader.
-539 ==>
-
+539 ==> 399153 - Selecting a picture with a tag and another without that tag, the \
checkbox is black instead of gray. +540 ==>
diff --git a/core/libs/imageproperties/disjointmetadata.cpp \
b/core/libs/imageproperties/disjointmetadata.cpp index 0b630c822d..cc21925c41 100644
--- a/core/libs/imageproperties/disjointmetadata.cpp
+++ b/core/libs/imageproperties/disjointmetadata.cpp
@@ -62,6 +62,7 @@ public:
ratingChanged(false),
templateChanged(false),
tagsChanged(false),
+ withoutTags(false),
pickLabel(-1),
highestPickLabel(-1),
colorLabel(-1),
@@ -88,6 +89,7 @@ public:
bool ratingChanged;
bool templateChanged;
bool tagsChanged;
+ bool withoutTags;
int pickLabel;
int highestPickLabel;
@@ -477,7 +479,7 @@ bool DisjointMetadata::write(ImageInfo info, WriteMode writeMode)
{
QList<int> keys = d->tags.keys();
- foreach(int key, keys)
+ foreach (int key, keys)
{
if (d->tags.value(key) == DisjointMetadata::MetadataAvailable)
{
@@ -595,7 +597,7 @@ void DisjointMetadata::loadTags(const QList<int>& tagIds)
{
QList<int> loadedTagIds;
- foreach(int tagId, tagIds)
+ foreach (int tagId, tagIds)
{
if (!TagsCache::instance()->isInternalTag(tagId))
{
@@ -605,6 +607,18 @@ void DisjointMetadata::loadTags(const QList<int>& tagIds)
if (loadedTagIds.isEmpty())
{
+ if (!d->withoutTags)
+ {
+ QMap<int, DisjointMetadata::Status>::iterator it;
+
+ for (it = d->tags.begin() ; it != d->tags.end() ; ++it)
+ {
+ it.value() = MetadataDisjoint;
+ }
+
+ d->withoutTags = true;
+ }
+
return;
}
@@ -612,9 +626,16 @@ void DisjointMetadata::loadTags(const QList<int>& tagIds)
if (d->tags.isEmpty())
{
- foreach(int tagId, loadedTagIds)
+ foreach (int tagId, loadedTagIds)
{
- d->tags[tagId] = MetadataAvailable;
+ if (d->withoutTags)
+ {
+ d->tags[tagId] = MetadataDisjoint;
+ }
+ else
+ {
+ d->tags[tagId] = MetadataAvailable;
+ }
}
return;
@@ -640,7 +661,7 @@ void DisjointMetadata::loadTags(const QList<int>& tagIds)
// new tags which are not yet in the set,
// are added as Disjoint
- foreach(int tagId, loadedTagIds)
+ foreach (int tagId, loadedTagIds)
{
if (!d->tags.contains(tagId))
{
@@ -796,7 +817,7 @@ QStringList DisjointMetadata::keywords() const
QList<int> keys = d->tags.keys();
- foreach(int key, keys)
+ foreach (int key, keys)
{
if (d->tags.value(key) == MetadataAvailable)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic