Skip to content

Commit

Permalink
[processing] Correctly delete processing dialogs
Browse files Browse the repository at this point in the history
del only delete the python variable, not the dialog which is owned by the main window.
  • Loading branch information
arnaud-morvan committed Aug 5, 2017
1 parent 04059eb commit 40ccd3b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/AlgorithmLocatorFilter.py
Expand Up @@ -90,7 +90,7 @@ def triggerResult(self, result):
dlg.exec_()
# have to manually delete the dialog - otherwise it's owned by the
# iface mainWindow and never deleted
del dlg
dlg.deleteLater()
if canvas.mapTool() != prevMapTool:
try:
canvas.mapTool().reset()
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/ProcessingToolbox.py
Expand Up @@ -252,7 +252,7 @@ def executeAlgorithmAsBatchProcess(self):
dlg.exec_()
# have to manually delete the dialog - otherwise it's owned by the
# iface mainWindow and never deleted
del dlg
dlg.deleteLater()

def executeAlgorithm(self):
item = self.algorithmTree.currentItem()
Expand Down Expand Up @@ -293,7 +293,7 @@ def executeAlgorithm(self):
self.addRecentAlgorithms(True)
# have to manually delete the dialog - otherwise it's owned by the
# iface mainWindow and never deleted
del dlg
dlg.deleteLater()
else:
feedback = MessageBarProgress()
context = dataobjects.createContext(feedback)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/ScriptEditorDialog.py
Expand Up @@ -280,7 +280,7 @@ def runAlgorithm(self):

# have to manually delete the dialog - otherwise it's owned by the
# iface mainWindow and never deleted
del dlg
dlg.deleteLater()

if canvas.mapTool() != prevMapTool:
try:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/ModelerDialog.py
Expand Up @@ -293,7 +293,7 @@ def runModel(self):
dlg.exec_()
# have to manually delete the dialog - otherwise it's owned by the
# iface mainWindow and never deleted
del dlg
dlg.deleteLater()

def save(self):
self.saveModel(False)
Expand Down

0 comments on commit 40ccd3b

Please sign in to comment.