diff --git a/tryton/gui/window/win_export.py b/tryton/gui/window/win_export.py index 3b5f33c16e..ce9753c8f3 100644 --- a/tryton/gui/window/win_export.py +++ b/tryton/gui/window/win_export.py @@ -270,8 +270,9 @@ class WinExport(object): def sig_unsel(self, widget=None): store, paths = self.view2.get_selection().get_selected_rows() - for i in paths: - store.remove(store.get_iter(i)) + while paths: + store.remove(store.get_iter(paths[0])) + store, paths = self.view2.get_selection().get_selected_rows() def sig_unsel_all(self, widget=None): self.model2.clear() diff --git a/tryton/gui/window/win_import.py b/tryton/gui/window/win_import.py index cd4db59c88..a6b6b9c7f3 100644 --- a/tryton/gui/window/win_import.py +++ b/tryton/gui/window/win_import.py @@ -291,9 +291,10 @@ class WinImport(object): store.get_value(iter,1)) def sig_unsel(self, widget=None): - (store, paths) = self.view2.get_selection().get_selected_rows() - for path in paths: - store.remove(store.get_iter(path)) + store, paths = self.view2.get_selection().get_selected_rows() + while paths: + store.remove(store.get_iter(paths[0])) + store, paths = self.view2.get_selection().get_selected_rows() def sig_unsel_all(self, widget=None): self.model2.clear()