[KPhotoAlbum] Category view problem

Robert Krawitz rlk at alum.mit.edu
Mon Feb 18 16:57:30 CET 2013


On Mon, 18 Feb 2013 20:26:51 +0530, Miika Turkia wrote:
> On Sun, Feb 17, 2013 at 11:55 PM, Robert Krawitz <rlk at alum.mit.edu> wrote:
>> On Sat, 16 Feb 2013 22:28:20 -0500, Robert Krawitz wrote:
>>> On Sat, 16 Feb 2013 18:14:09 -0500, Robert Krawitz wrote:
>>>> I'm having a strange problem with category view.
>>>>
>>>> I frequently keyword every shot I take at an event.  I then select the
>>>> ones I'm interested in, and keyword them with the same name, followed by
>>>> "selection".  So I might have keywords of
>>>>
>>>> MIT-Babson Jan. 12, 2013
>>>>
>>>> and
>>>>
>>>> MIT-Babson Jan. 12, 2013 selection
>>>>
>>>> The latter is of course a subcategory of the former.
>>>>
>>>> The problem is that in category view, the number of photos in the parent
>>>> category is always shown as either exactly the number of photos in the
>>>> selection subcategory, or twice that number.  If I then click on that
>>>> row, the correct number is displayed.
>>>>
>>>> It appears, though, that it isn't the name that causes this (if I
>>>> keyword the subselection XXXX the same thing happens).
>>>>
>>>> But there's another, much more serious problem.  If I select all the
>>>> photos in the subselect category, and type ctrl-2 to tag them all, I
>>>> cannot selectively remove them from just the subcategory or the
>>>> supercategory.  Initially, both subcategory and supercategory are
>>>> checked.  If I check or uncheck either one, both are shown as checked or
>>>> unchecked.
>>>>
>>>> If I don't make the selection a subcategory of the main keyword, I don't
>>>> have this problem.
>>>>
>>>> In general, it appears that if there is a category/subcategory
>>>> relationship, I cannot use ctrl-2 to change just one of the tags on
>>>> images.
>>>
>>> There are actually two problems, based on git bisect.
>>>
>>> The first problem (showing bad counts) is:
>>>
>>> a54dfe608536ae9af2cd2a8407fd02af63cec6f6 is the first bad commit
>>> commit a54dfe608536ae9af2cd2a8407fd02af63cec6f6
>>> Author: Jesper K. Pedersen <blackie at kde.org>
>>> Date:   Fri Jan 4 21:35:35 2013 +0100
>>>
>>>     s/Q3Dict/QHash for countedGroupDict
>>>
>>> :040000 040000 b3433e714a55b8cade49e21a3d32b3d6e28ee81e 6e4965242e91f5bfbc705e4e38bf370400b36805 M      DB
>>>
>>> I haven't figured out what's going on here.
>>
>> The double negative problem strikes again.
>>
>> diff --git a/DB/GroupCounter.cpp b/DB/GroupCounter.cpp
>> index 7cf04ee..cb5bc87 100644
>> --- a/DB/GroupCounter.cpp
>> +++ b/DB/GroupCounter.cpp
>> @@ -95,7 +95,7 @@ void GroupCounter::count( const StringSet& categories )
>>              }
>>          }
>>          // The item Nevada should itself go into the group Nevada.
>> -        if ( !countedGroupDict.contains( *categoryIt ) == 0 && _groupCount.contains( *categoryIt ) ) {
>> +        if ( !countedGroupDict.contains( *categoryIt ) && _groupCount.contains( *categoryIt ) ) {
>>               countedGroupDict.insert( *categoryIt);
>>               (_groupCount[*categoryIt])++;
>>          }
>
> So is this a fix to the whole issue? Ready to be pushed to master?

That fixes the issue of bad counts.  The other one I posted fixes the
problem of not being able to just select the category or subcategory.
-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

MIT VI-3 1987 - Congratulations MIT Engineers men's hoops Final Four!
Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton


More information about the KPhotoAlbum mailing list