Page 1 of 1

Sorting by label or tag doesn't work when TagSortKeepTagsOnTop is disabled

Posted: 14 Mar 2026 02:31
by daniel_m
From the help file, I gather that TagSortKeepTagsOnTop sorts labelled/tagged files on top of the list when I click on the label or tag column header. Descending and ascending sorting reverses the order of the labelled/tagged items, but they remain on top of the file list as a block. This does work very well.

When TagSortKeepTagsOnTop is disabled, sorting by label/tag seems random. I would expect labelled/tagged files to be on top or bottom of the list, depending on descending and ascending sorting, but still in a block separate from unlabelled/untagged files.

To replicate:
Open a fresh instance of XYplorer and add a Label column. Enable "Show implicit secondary sort order arrow" for clarity (doesn't affect the result). Make a folder and 7 files "a.file" to "g.file". Apply Label "1" to files "a" and "b", Label "2" to file "c", and Label "3" to file "d".
Click onto the Name header to sort by Name in ascending order. Then, click on the Label header to sort by Label first, and Name second, both ascending.

(A) What I'd expect with TagSortKeepTagsOnTop disabled:

Code: Select all

[sort by Label, ascending]		[sort by Label, descending]
Label	Name				Label	Name
1	a.file					e.file
1	b.file					f.file
2	c.file					g.file
3	d.file				3	d.file
	e.file				2	c.file
	f.file				1	b.file
	g.file				1	a.file
(B) What I get:

Code: Select all

[sort by Label, ascending]		[sort by Label, descending]
Label	Name				Label	Name
	f.file					e.file
1	a.file				3	d.file
1	b.file				2	c.file
	g.file					g.file
2	c.file				1	b.file
3	d.file				1	a.file
	e.file					f.file
It gets more complicated. I get the above result when the list was initially sorted ascending by Name, as described above, but also initially by Ext or Type. When the list was initially sorted ascending by Size, Modified, or Created, the Label sorting works as expected (A).
Oh, and we are not done yet 😁
I get the inverse result when the list was initially sorted in descending order. Then, initially sorted by Name, Ext, or Type result in the correct Label sorting (A), while Size, Modified, or Created, result in the wrong Label sorting (B).
It gets weirder when the empty files get filled with text, resulting in different file sizes. I guess messing with the other file properties will also yield results different from (B), but still incorrect.

(This was tested on version 28.20.0501 x64)

Re: Sorting by label or tag doesn't work when TagSortKeepTagsOnTop is disabled

Posted: 14 Mar 2026 12:55
by admin
Works fine here. Could you show a screenshot of the situation, with all columns in sight?

I see it now in x64. (First I only tested x32 because I thought they behaved the same).

Re: Sorting by label or tag doesn't work when TagSortKeepTagsOnTop is disabled

Posted: 14 Mar 2026 14:42
by admin
Fixed in next beta. :tup:

Re: Sorting by label or tag doesn't work when TagSortKeepTagsOnTop is disabled

Posted: 14 Mar 2026 16:43
by daniel_m
Great, thanks!

I hope fixing bugs didn't spoil your weekend. I assume you did it because you wanted to but would still like to let you know that there was no expectation of you reading the bug report within a day, and less so on a weekend 🙂

Re: Sorting by label or tag doesn't work when TagSortKeepTagsOnTop is disabled

Posted: 14 Mar 2026 16:53
by admin
No worries, bug fixing is fun! :beer: