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

Tweaked Make Selected into Reference.

Having dupes from ref folders (which makes ref switching impossible) would make
the new feature glitchy (selection would be emptied). Now, in cases where the action
results in nothing being changed, the selection stays intact. [#222]
This commit is contained in:
Virgil Dupras
2013-04-28 14:12:08 -04:00
parent aa3cf9700d
commit 70e505ad92
3 changed files with 12 additions and 7 deletions

View File

@@ -325,14 +325,15 @@ class Group:
def switch_ref(self, with_dupe):
if self.ref.is_ref:
return
return False
try:
self.ordered.remove(with_dupe)
self.ordered.insert(0, with_dupe)
self._percentage = None
self._matches_for_ref = None
return True
except ValueError:
pass
return False
dupes = property(lambda self: self[1:])