1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#222] Tweaked dupe selection after a ref-swapping action.

This commit is contained in:
Virgil Dupras
2013-04-27 10:08:38 -04:00
parent 11450ae56a
commit 592eba9eaa
2 changed files with 8 additions and 5 deletions

View File

@@ -442,7 +442,13 @@ class DupeGuru(RegistrableApplication, Broadcaster):
if g not in changed_groups:
self.results.make_ref(dupe)
changed_groups.add(g)
self.notify('results_changed_but_keep_selection')
# It's not always obvious to users what this action does, so to make it a bit clearer,
# we change our selection to the ref of all changed groups. However, we also want to keep
# 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.
self.selected_dupes = [d for d in self.selected_dupes
if self.results.get_group_of_duplicate(d).ref is d]
self.notify('results_changed')
def mark_all(self):
self.results.mark_all()