mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Improved selection handling during ref-swapping under dupes-only mode.
Previously, our selection would simply be lost (because the dupes that were just swapped wouldn't be present in the table). Now, instead of trying to preserve our dupe-selection, we preserve our index-selection when in dupes-only mode. [#222]
This commit is contained in:
parent
89955aa96a
commit
e86b23259c
@ -449,10 +449,18 @@ class DupeGuru(RegistrableApplication, Broadcaster):
|
|||||||
# the files that were ref before and weren't changed by the action. In effect, what this
|
# the files that were ref before and weren't changed by the action. In effect, what this
|
||||||
# does is that we keep our old selection, but remove all non-ref dupes from it.
|
# does is that we keep our old selection, but remove all non-ref dupes from it.
|
||||||
# If no group was changed, however, we don't touch the selection.
|
# If no group was changed, however, we don't touch the selection.
|
||||||
|
if not self.result_table.power_marker:
|
||||||
if changed_groups:
|
if changed_groups:
|
||||||
self.selected_dupes = [d for d in self.selected_dupes
|
self.selected_dupes = [d for d in self.selected_dupes
|
||||||
if self.results.get_group_of_duplicate(d).ref is d]
|
if self.results.get_group_of_duplicate(d).ref is d]
|
||||||
self.notify('results_changed')
|
self.notify('results_changed')
|
||||||
|
else:
|
||||||
|
# If we're in "Dupes Only" mode (previously called Power Marker), things are a bit
|
||||||
|
# different. The refs are not shown in the table, and if our operation is successful,
|
||||||
|
# this means that there's no way to follow our dupe selection. Then, the best thing to
|
||||||
|
# do is to keep our selection index-wise (different dupe selection, but same index
|
||||||
|
# selection).
|
||||||
|
self.notify('results_changed_but_keep_selection')
|
||||||
|
|
||||||
def mark_all(self):
|
def mark_all(self):
|
||||||
self.results.mark_all()
|
self.results.mark_all()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user