Skip to content
Permalink
Browse files

[processing] Correctly delete processing dialogs

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 40ccd3bcb329266e8535fded73045579e9fad870
@@ -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()
@@ -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()
@@ -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)
@@ -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:
@@ -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)

0 comments on commit 40ccd3b

Please sign in to comment.
You can’t perform that action at this time.