During Make Selected Reference, it's now the selection *paths* that are restored rather than the selected *dupes*

This commit is contained in:
Virgil Dupras 2010-02-13 10:39:54 +01:00
parent 7477330961
commit 6b0bfda9fb
3 changed files with 12 additions and 1 deletions

View File

@ -239,7 +239,7 @@ class DupeGuru(RegistrableApplication, Broadcaster):
if g not in changed_groups:
self.results.make_ref(dupe)
changed_groups.add(g)
self.notify('results_changed')
self.notify('results_switched')
def mark_all(self):
self.results.mark_all()

View File

@ -27,3 +27,6 @@ class GUIObject(Listener):
def results_changed(self):
pass
def results_switched(self):
pass

View File

@ -149,3 +149,11 @@ class ResultTree(GUIObject, Tree):
self._refresh()
self.view.refresh()
def results_switched(self):
# What we want to to here is that instead of restoring selected *dupes* after refresh, we
# restore selected *paths*.
paths = self.selected_paths
self._refresh()
self.selected_paths = paths
self.view.refresh()