0.84: Category filter: Deselecting doesn't deselect children

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, xnview, Dreamer

User avatar
helmut
Posts: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

0.84: Category filter: Deselecting doesn't deselect children

Post by helmut » Wed Feb 08, 2017 12:02 am

XnView: MP 0.84
OS: Windows - 32 bit

When selecting multiple categories using "Ctrl" key and selecting an unexpanded category with children and deselecting it, again, the children remain checked.

Effect: Confusing/Unexpected behaviour

To reproduce:
1. Start XnView
2. In XnView browser open the Category filter.
3. Select a category with left mouse click.
4. Select a second, unexpanded category with child categories by clicking on it with Ctrl + mouse click.
5. Deselect the second category by clicking on it with Ctrl + Mouse click for a second time.
6. Open the second, unexpanded category by clicking on the "+" symbol.
Actual behaviour (bug): All children of the category are still selected :bug:
Expected behaviour: When deselecting a unexpanded parent category, all children should be deselected, too.

User avatar
xnview
Author of XnView
Posts: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by xnview » Wed Feb 08, 2017 12:26 pm

helmut wrote:Expected behaviour: When deselecting a unexpanded parent category, all children should be deselected, too.
in Lightroom, we have not this behavior
Pierre.

User avatar
m.Th.
XnThusiast
Posts: 1560
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by m.Th. » Thu Feb 09, 2017 8:44 am

The wrong behavior is when also the children are selected for an unexpanded category.

From my little experience (we have a suite of programs in which we have used from many years extensively the multi-select tree of keywords for searching/filtering) the best thing for the users is:

When one clicks on an item toggle the selection of the said item ONLY.

Provide as a right-click menu option the followings:

- Select all children
- Deselect all children
- Toggle all children

The above are quite powerful and usually can be done with the same piece of code (same iterator) - the only change needed is, of course, the actual action which is oCrtNode.Checked = True - or - oCrtNode.Checked = False - or - oCrtNode.Checked = not oCrtNode.Checked .

Something like this.

This is a distinctive feature from Lr which can be a very powerful one, mitigating the need of freezing the tree structure by saving in the file/sidecar the entire path of keywords - for example : Europe | France | Paris. With the feature above we can be much more flexible and faster.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
helmut
Posts: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by helmut » Thu Feb 09, 2017 7:53 pm

xnview wrote:
helmut wrote:Expected behaviour: When deselecting a unexpanded parent category, all children should be deselected, too.
in Lightroom, we have not this behavior
Are you really sure? I can't believe that this should be the way Lightroom behaves.
m.Th. wrote:The wrong behavior is when also the children are selected for an unexpanded category. ...
No, selecting both the category and its unexpanded children isn't a problem. It turns into a problem only if deselecting a category with unexpanded children doesn't deselect the children also. Then, selection and deselection is no longer symmetric and behaviour is really unexpected and wrong.

User avatar
m.Th.
XnThusiast
Posts: 1560
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by m.Th. » Mon Feb 13, 2017 10:09 am

No, selecting both the category and its unexpanded children isn't a problem.
So....

...the vast majority of DAM hierarchies (imposed mainly by Lightroom but not only - see IDImager/PhotoSupreme etc.) have some big roots like:

Code: Select all

Places
	Europe
		Romania
			Transylvania
				Sibiu
					City Hall
					Main Cathedral
					The Theatre
					...
				Brasov
					City Hall
					...
				Oradea
				...
			Moldavia
				Iasi
				Vaslui
				Suceava
				...
			...
		Greece
			<regions / counties here>
				<towns / places here>
					<places of interest here>
				...
			...
People
	Jobs
		...
	Positions
		...
	Names
		...
	Race/Sex
		...
Events
	<a gazillion of subdivisions>
	...
Objects
	<a bigger gazillion of subdivisions>
	...
Clicking by mistake on a higher-level root in order to UNCONDITIONALLY (de)select all the invisible children will have a big impact on the filter (including the possibility of destroying a carefully-crafted selection of keywords for the filter) and thus it need a decisive confirmation from the user. (a dialogue, right-click menu etc.).

Besides that, there is a standard practice to use a root category for the least common-denominator category. For example I have a photo which depicts a landscape from Europe but I don't know or I simply don't want to record from where it is. Then simply I assign the category "Europe". One can find this practice many times in cataloging on various cases.

Hence there is a need to see the photos with the category "Europe" and ONLY this one (iow NON-recursively). The natural way is to click on it. When we click in any program (including XnView MP :) ) on C:\My Pictures it shows us ONLY the pictures from that folder (NON recursive). It needs a decisive, separate action ("Show all files (recursive)" or "Search") in order to achieve the behavior which you describe.

It is not standard to have selected also the children for displaying purposes (filtering).
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
helmut
Posts: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by helmut » Mon Feb 13, 2017 8:44 pm

m.Th. wrote:... It is not standard to have selected also the children for displaying purposes (filtering).
Let's summarize things:

• When selecting a category, its child categories must be never be selected (regardless whether the children are expanded or not).

• When deselecting a category, its child categories must never be deslected (regardless whether the chidlren are expaned or not).

• It could be a useful to have a way to select and deselect a category including all its children, e.g. by using Ctrl + Mouse click. If you (m.Th.) also think that this would be useful please create a new post in "Suggestions".

Is my summary correct, m.Th.?

User avatar
m.Th.
XnThusiast
Posts: 1560
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by m.Th. » Tue Feb 14, 2017 10:33 am

helmut wrote:
m.Th. wrote:... It is not standard to have selected also the children for displaying purposes (filtering).
Let's summarize things:

• When selecting a category, its child categories must be never be selected (regardless whether the children are expanded or not).

• When deselecting a category, its child categories must never be deslected (regardless whether the chidlren are expaned or not).

• It could be a useful to have a way to select and deselect a category including all its children, e.g. by using Ctrl + Mouse click. If you (m.Th.) also think that this would be useful please create a new post in "Suggestions".

Is my summary correct, m.Th.?
Correct. :)

The suggestion is here: http://newsgroup.xnview.com/viewtopic.php?f=60&t=34875
(copy/pasted from a post above ITT)
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
helmut
Posts: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by helmut » Tue Feb 14, 2017 11:10 am

m.Th. wrote:Correct. :)
Good! Thank you for writing up a suggestion. :)

vertigo
Posts: 118
Joined: Wed Feb 15, 2017 3:49 pm

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by vertigo » Thu Feb 16, 2017 1:33 am

Additionally, if you deselect the parent it actually selects all the children, even the ones that weren't selected.

1) Expand a category, then select another one, then select (with ctrl) the expanded category
2) Deselect a couple of the children, as if you wanted most but not all of them, hence selecting the parent (to select them all) then deselecting the ones you don't want
3) Deselect the parent, which causes ALL of the children to be selected. Regardless of how you feel selection of children should behave, this is definitely not right behavior in any definition :P
4) Go back to step 1 and select the expanded category THEN select another one (with ctrl). Now the children aren't selected, so you get entirely different results despite doing essentially the same thing (just in a different order).

I do see the failure to deselect the children as a problem, especially since if the parent isn't expanded you wouldn't even know it and would likely assume they're deselected. But I also agree that deselecting them all automatically when deselecting the parent could be bad, because you could spend a while selecting which ones you want then lose it all by accidentally clicking on the parent. Then again, you would just as easily lose all that work and more by accidentally clicking anywhere without holding ctrl, so there has to be some level of "if you're not careful you're going to screw yourself." This is why checkboxes are useful. With a checkbox next to each item, you would just check item one, then check item two (the non-expanded parent), then uncheck the children you don't want (which would make the checkmark next to the parent something else to indicate not everything under it is checked, like a grayed-out check or something), and unchecking the parent would uncheck all children.

See attached image for example:
Attachments
MultiStateDemo.gif
MultiStateDemo.gif (11.5 KiB) Viewed 1167 times

User avatar
helmut
Posts: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by helmut » Thu Feb 16, 2017 7:46 am

Thank you for checking, vertigo.

The bug has been reproduce and solution is described. :arrow: Reproduced

User avatar
m.Th.
XnThusiast
Posts: 1560
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by m.Th. » Thu Feb 16, 2017 5:26 pm

and unchecking the parent would uncheck all children
If this would be true, this would means in your example than we cannot see the photos with the patriarch John (the root) alone but only if we see also the photos with Chuck, Melissa, Nancy, Peter, Chantal etc.

the Patriarch John does NOT contain the „sub-folders” Chuck, Melissa etc.

They are different entities.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

vertigo
Posts: 118
Joined: Wed Feb 15, 2017 3:49 pm

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by vertigo » Thu Feb 16, 2017 6:38 pm

Chuck, Melissa, and Nancy are files under John and Peter is a folder under John, containing more folders and files. Maybe not the best example, but if we imagine the files are pictures (say, of their kids), then to view just John's kids' pictures we could either select them individually or we could select the checkbox for folder 'John' and deselect the checkboxes next to each folder inside the 'John' folder. In the example, the pictures of Chuck, Melissa, Nancy, Paul, Donna, and Eric are selected, and Pascal, Rutger, and Charlotte are not (and some in the bottom folders are selected as well). Clicking on the checkbox next to 'Chantal' would uncheck that and all folders and files under it (Paul, Donna, and Eric here). Clicking on the checkbox next to Peter (the top one) would initially check all items under it then uncheck them when clicking it a second time, or vice versa. That's how every checkbox tree structure I've used has worked. As I said, this can certainly be a problem if you have it all set up like below then accidentally click the checkbox next to 'The Family' or 'John' or any others really, but the only way around that is to have a potentially annoying dialog box pop up every time and ask if you're sure you meant to click there. But at least with checkboxes it makes it more clear what's going on and it removes the possibility of clearing all your selections by clicking empty space. Maybe a way to prevent accidentally clicking a box and screwing yourself would be to require clicking twice or even double-clicking. This would probably be best as an option, though, as it might bother some people and it certainly would cause people to think it wasn't working correctly if they didn't know it was intended behavior.

User avatar
xnview
Author of XnView
Posts: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by xnview » Fri Feb 17, 2017 8:32 am

helmut wrote:
m.Th. wrote:Correct. :)
Good! Thank you for writing up a suggestion. :)
so we can close this topic?
Pierre.

User avatar
helmut
Posts: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by helmut » Fri Feb 17, 2017 8:46 am

xnview wrote:... so we can close this topic?
No, current behaviour is wrong. XnView should behave like this:
helmut wrote:Let's summarize things:

• When selecting a category, its child categories must be never be selected (regardless whether the children are expanded or not).

• When deselecting a category, its child categories must never be deslected (regardless whether the chidlren are expaned or not). ...
In addition, m.Th. has added a suggestion for selecting children but that is not a bug but a suggestion.

User avatar
xnview
Author of XnView
Posts: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.84: Category filter: Deselecting doesn't deselect chil

Post by xnview » Fri Feb 17, 2017 9:36 am

helmut wrote:
xnview wrote:... so we can close this topic?
No, current behaviour is wrong. XnView should behave like this:
helmut wrote:Let's summarize things:

• When selecting a category, its child categories must be never be selected (regardless whether the children are expanded or not).

• When deselecting a category, its child categories must never be deslected (regardless whether the chidlren are expaned or not). ...
In addition, m.Th. has added a suggestion for selecting children but that is not a bug but a suggestion.
but it's already like that
Pierre.

Post Reply