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

@@ -244,8 +244,9 @@ class Results(Markable):
def make_ref(self, dupe):
g = self.get_group_of_duplicate(dupe)
r = g.ref
if not g.switch_ref(dupe):
return False
self._remove_mark_flag(dupe)
g.switch_ref(dupe);
if not r.is_ref:
self.__total_count += 1
self.__total_size += r.size
@@ -254,6 +255,7 @@ class Results(Markable):
self.__total_size -= dupe.size
self.__dupes = None
self.is_modified = True
return True
def perform_on_marked(self, func, remove_from_results):
# Performs `func` on all marked dupes. If an EnvironmentError is raised during the call,