diff --git a/Orange/widgets/unsupervised/owlouvainclustering.py b/Orange/widgets/unsupervised/owlouvainclustering.py index 2bd4c923e90..10738c4252e 100644 --- a/Orange/widgets/unsupervised/owlouvainclustering.py +++ b/Orange/widgets/unsupervised/owlouvainclustering.py @@ -265,8 +265,7 @@ def commit(self): # Prepare callbacks queue.on_progress.connect(lambda val: self.progressBarSet(100 * val)) - queue.on_complete.connect(self._processing_complete) - queue.on_complete.connect(self._send_data) + queue.on_complete.connect(self._on_complete) queue.on_exception.connect(self._handle_exceptions) self.__queue = queue @@ -275,6 +274,10 @@ def commit(self): self.setBlocking(True) self.__future = self.__executor.submit(queue.start) + def _on_complete(self): + self._processing_complete() + self._send_data() + def _send_data(self): if self.partition is None or self.data is None: return