Categories filter at Categories assignment is desynced

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

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

Categories filter at Categories assignment is desynced

Post by m.Th. »

Steps:

0. (setup) make sure that no image is assigned to Cat1
1. Click to select img01.jpg
2. Assign to it the category Cat1
3. Click to select img02.jpg
4. Assign to it the category Cat1
5. Without doing anything else, go to Categories Filter and click on the Cat1 to show the assigned photos.

Expected:

In the Categories Filter the Cat1's count should show (2).
When we click on Cat1 we must see 2 pictures (img01 and img02).

Actual:

In the Categories Filter the Cat1's count shows (1).
When we click on Cat1 we see one picture (img01).

Cause:

Most probably because the reason stems in the fact that the categories are actually written to DB when a certain signal occurs (the next photo is selected? - OnSelectionChange or similar?). I think that besides that there must be hook other signals for this - at least OnFocusLost or similar.

Also, I'm seriously thinking that the best solution is to write the categories immediately when they are assigned. This is because nowadays the SQLite's cache together with OSes caches together with HDD/SSD caches together with the general computer speed are waaaaaaay over of the need to write a category on several images. (Remember that by far the weakest/slowest link here is the human which enters the keywords from his keyboard). Of course, is better to have also a transactional/batch mode like the one which we have now but I'm afraid of data loss and other problems (like the above) in this scenario.
m. Th.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Categories filter at Categories assignment is desynced

Post by xnview »

See Issue 443 for current status and details.
Pierre.
Post Reply