Skip to content

Commit 40ccd3b

Browse files
committed
[processing] Correctly delete processing dialogs
del only delete the python variable, not the dialog which is owned by the main window.
1 parent 04059eb commit 40ccd3b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

python/plugins/processing/gui/AlgorithmLocatorFilter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def triggerResult(self, result):
9090
dlg.exec_()
9191
# have to manually delete the dialog - otherwise it's owned by the
9292
# iface mainWindow and never deleted
93-
del dlg
93+
dlg.deleteLater()
9494
if canvas.mapTool() != prevMapTool:
9595
try:
9696
canvas.mapTool().reset()

python/plugins/processing/gui/ProcessingToolbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def executeAlgorithmAsBatchProcess(self):
252252
dlg.exec_()
253253
# have to manually delete the dialog - otherwise it's owned by the
254254
# iface mainWindow and never deleted
255-
del dlg
255+
dlg.deleteLater()
256256

257257
def executeAlgorithm(self):
258258
item = self.algorithmTree.currentItem()
@@ -293,7 +293,7 @@ def executeAlgorithm(self):
293293
self.addRecentAlgorithms(True)
294294
# have to manually delete the dialog - otherwise it's owned by the
295295
# iface mainWindow and never deleted
296-
del dlg
296+
dlg.deleteLater()
297297
else:
298298
feedback = MessageBarProgress()
299299
context = dataobjects.createContext(feedback)

python/plugins/processing/gui/ScriptEditorDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def runAlgorithm(self):
280280

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

285285
if canvas.mapTool() != prevMapTool:
286286
try:

python/plugins/processing/modeler/ModelerDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def runModel(self):
293293
dlg.exec_()
294294
# have to manually delete the dialog - otherwise it's owned by the
295295
# iface mainWindow and never deleted
296-
del dlg
296+
dlg.deleteLater()
297297

298298
def save(self):
299299
self.saveModel(False)

0 commit comments

Comments
 (0)