# \[F\] Selection wrong after changing sort-key data and then undoing

**URL:** https://community.mp3tag.de/t/f-selection-wrong-after-changing-sort-key-data-and-then-undoing/9373
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [November 19, 2009, 2:07pm UTC](https://community.mp3tag.de/t/f-selection-wrong-after-changing-sort-key-data-and-then-undoing/9373 "2009-11-19T14:07:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gvm](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/48db29/32.png) [@gvm](https://community.mp3tag.de/u/gvm)
#### Post date: [November 19, 2009, 2:07pm UTC](https://community.mp3tag.de/t/f-selection-wrong-after-changing-sort-key-data-and-then-undoing/9373/1 "2009-11-19T14:07:26Z")

</div>

This isssue is similar to Sort with selected files gives strange results and 2.44f: Filter result wrong after new sort, but is still present in 2.44h.

After changing data in one field, and then undoing that change (Ctrl-Z) the screen scrolls and new, unrelated files become selected.

I think that the problem occurs when one field (e.g. Title) has its sort order specified (using "Customise Columns..." and "Sort On") to depend on a different field (e.g. TitleSortOrder).

The problem seems to arise in cases where, in this example, "Title" is selected as the currently-active sort field, several files are selected and the data in their "TitleSortOrder" field is changed so as to make them out of sort order. No re-sort occurs immediately, but following this with an "Undo" triggers a re-sort, but the the file selection changes. However, there is some other factor involved, or I've got some part of it wrong, because I haven't been able to reproduce it by doing only these steps.

Sorry I don't have a precise step by step method of reproducing it, but I've seen it happen "in the wild" twice, and I was able to trigger it deliberately twice immediately after that. When I tried to pin it down, however, it stopped happening once I'd specified a different sort column, then the first one again.

As far as I can tell, the displayed data is itself correct, it's only the selection status that changes, so it's not quite as critical as some of the other "undo-related" issues.

Sorry this is a little vague - there may or may not be enough information here to identify the issue in the code. I'll post more details as/if I find them.

Regards,

gvm

(BTW, in case anyone thinks I'm doing a lot of "undo" operations - it's not just that I make a lot of mistakes - I'm testing out some Action Groups for manipulating names. I'll release them when they're done. On the other hand, I do make a lot of mistakes, too... )

(Keep up the good work, Florian!)

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 19, 2009, 2:57pm UTC](https://community.mp3tag.de/t/f-selection-wrong-after-changing-sort-key-data-and-then-undoing/9373/2 "2009-11-19T14:57:57Z")

</div>

I haven't reproduced it yet, but the more I think about it the more irritating I find the sorting after undo.

What do you think?

---

<div class="post-metadata">

### Author: ![gvm](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/48db29/32.png) [@gvm](https://community.mp3tag.de/u/gvm)
#### Post date: [November 20, 2009, 3:58pm UTC](https://community.mp3tag.de/t/f-selection-wrong-after-changing-sort-key-data-and-then-undoing/9373/3 "2009-11-20T15:58:40Z")

</div>

Do you mean that a sort is always triggered after an undo operation?

If that's what you're saying, and you think that it might be connected to this, then removing it does seem worth trying. I guess that the only time that it would be worth having would be when you're undoing an action that is known to have changed the sort order.

Regards,

gvm

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 2:03pm UTC](https://community.mp3tag.de/t/f-selection-wrong-after-changing-sort-key-data-and-then-undoing/9373/4 "2018-12-28T14:03:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
