diff --git a/python/plugins/processing/gui/AlgorithmLocatorFilter.py b/python/plugins/processing/gui/AlgorithmLocatorFilter.py index 2387c6760ae..38a8c83b546 100755 --- a/python/plugins/processing/gui/AlgorithmLocatorFilter.py +++ b/python/plugins/processing/gui/AlgorithmLocatorFilter.py @@ -88,6 +88,9 @@ class AlgorithmLocatorFilter(QgsLocatorFilter): prevMapTool = canvas.mapTool() dlg.show() dlg.exec_() + # have to manually delete the dialog - otherwise it's owned by the + # iface mainWindow and never deleted + del dlg if canvas.mapTool() != prevMapTool: try: canvas.mapTool().reset() diff --git a/python/plugins/processing/gui/ProcessingToolbox.py b/python/plugins/processing/gui/ProcessingToolbox.py index 555c0ff484b..074e71dea75 100644 --- a/python/plugins/processing/gui/ProcessingToolbox.py +++ b/python/plugins/processing/gui/ProcessingToolbox.py @@ -250,6 +250,9 @@ class ProcessingToolbox(BASE, WIDGET): dlg = BatchAlgorithmDialog(alg) dlg.show() dlg.exec_() + # have to manually delete the dialog - otherwise it's owned by the + # iface mainWindow and never deleted + del dlg def executeAlgorithm(self): item = self.algorithmTree.currentItem() @@ -288,6 +291,9 @@ class ProcessingToolbox(BASE, WIDGET): ProcessingConfig.SHOW_RECENT_ALGORITHMS) if showRecent: self.addRecentAlgorithms(True) + # have to manually delete the dialog - otherwise it's owned by the + # iface mainWindow and never deleted + del dlg else: feedback = MessageBarProgress() context = dataobjects.createContext(feedback) diff --git a/python/plugins/processing/gui/ScriptEditorDialog.py b/python/plugins/processing/gui/ScriptEditorDialog.py index 3abccb0f022..cb2d85266fa 100644 --- a/python/plugins/processing/gui/ScriptEditorDialog.py +++ b/python/plugins/processing/gui/ScriptEditorDialog.py @@ -279,6 +279,10 @@ class ScriptEditorDialog(BASE, WIDGET): dlg.show() dlg.exec_() + # have to manually delete the dialog - otherwise it's owned by the + # iface mainWindow and never deleted + del dlg + if canvas.mapTool() != prevMapTool: try: canvas.mapTool().reset() diff --git a/python/plugins/processing/gui/menus.py b/python/plugins/processing/gui/menus.py index c9164a2978f..02d4f9e4f1e 100644 --- a/python/plugins/processing/gui/menus.py +++ b/python/plugins/processing/gui/menus.py @@ -211,6 +211,9 @@ def _executeAlgorithm(alg): prevMapTool = canvas.mapTool() dlg.show() dlg.exec_() + # have to manually delete the dialog - otherwise it's owned by the + # iface mainWindow and never deleted + del dlg if canvas.mapTool() != prevMapTool: try: canvas.mapTool().reset() diff --git a/python/plugins/processing/modeler/ModelerDialog.py b/python/plugins/processing/modeler/ModelerDialog.py index 4a7089f7688..3fe67981723 100644 --- a/python/plugins/processing/modeler/ModelerDialog.py +++ b/python/plugins/processing/modeler/ModelerDialog.py @@ -291,6 +291,9 @@ class ModelerDialog(BASE, WIDGET): dlg = AlgorithmDialog(self.model) dlg.exec_() + # have to manually delete the dialog - otherwise it's owned by the + # iface mainWindow and never deleted + del dlg def save(self): self.saveModel(False)