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:
@@ -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:])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user