diff --git a/Orange/widgets/unsupervised/owhierarchicalclustering.py b/Orange/widgets/unsupervised/owhierarchicalclustering.py index 7cfdb25d455..c071a0c0bfc 100644 --- a/Orange/widgets/unsupervised/owhierarchicalclustering.py +++ b/Orange/widgets/unsupervised/owhierarchicalclustering.py @@ -439,6 +439,7 @@ def select_item(self, item, state): if item in self._selection: if state == False: self._remove_selection(item) + self._re_enumerate_selections() self.selectionChanged.emit() else: # If item is already inside another selected item, @@ -455,11 +456,11 @@ def select_item(self, item, state): if state: self._add_selection(item) - self._re_enumerate_selections() elif item in self._selection: self._remove_selection(item) + self._re_enumerate_selections() self.selectionChanged.emit() def _add_selection(self, item): @@ -499,8 +500,6 @@ def _remove_selection(self, item): del self._selection[item] - self._re_enumerate_selections() - def _selected_sub_items(self, item): """Return all selected subclusters under item.""" def branches(item):