[KPhotoAlbum] Category view problem

Robert Krawitz rlk at alum.mit.edu
Sun Feb 17 04:28:20 CET 2013

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 second problem (selecting the subcategory, and trying to untag the
subcategory untags the master and vice versa) is:

5f865348e266d88f2c90840fdee464cba1943e56 is the first bad commit
commit 5f865348e266d88f2c90840fdee464cba1943e56
Author: Jesper K. Pedersen <blackie at kde.org>
Date:   Sun Dec 30 23:14:30 2012 +0100

    configure all items

:040000 040000 7ffcd45e249b941109baa4204ab606fbfce805e8 a500b2c5ae0ceb5ba621d0f3827c093f68433031 M      AnnotationDialog

I have verified that applying the change below gets rid of the symptom
in question (but don't know what other effects it may have):

diff --git a/AnnotationDialog/ListSelect.cpp b/AnnotationDialog/ListSelect.cpp
index 827066f..2b4678e 100644
--- a/AnnotationDialog/ListSelect.cpp
+++ b/AnnotationDialog/ListSelect.cpp
@@ -196,8 +196,10 @@ void AnnotationDialog::ListSelect::setMode( UsageMode mode )
     for ( QTreeWidgetItemIterator itemIt( _treeWidget ); *itemIt; ++itemIt )
         configureItem( dynamic_cast<CategoryListView::CheckDropItem*>(*itemIt) );
     // ensure that the selection count indicator matches the current mode:

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