Skip to content

Commit

Permalink
Merge pull request #2960 from ales-erjavec/fixes/vizrank-shutdown
Browse files Browse the repository at this point in the history
[FIX] Vizrank: Properly shutdown/wait when parent deleted
  • Loading branch information
markotoplak authored Mar 19, 2018
2 parents 8326a62 + a018fd6 commit 468e3fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Orange/widgets/visualize/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Information(WidgetMessagesMixin.Information):

def __init__(self, master):
"""Initialize the attributes and set up the interface"""
QDialog.__init__(self, windowTitle=self.captionTitle)
QDialog.__init__(self, master, windowTitle=self.captionTitle)
WidgetMessagesMixin.__init__(self)
self.setLayout(QVBoxLayout())

Expand Down Expand Up @@ -182,6 +182,10 @@ def hideEvent(event):

def deleteEvent():
vizrank.keep_running = False
if vizrank._thread is not None and vizrank._thread.isRunning():
vizrank._thread.quit()
vizrank._thread.wait()

master_delete_event()

master.closeEvent = closeEvent
Expand Down

0 comments on commit 468e3fa

Please sign in to comment.