mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Really delete processing dialogs
The dialogs are parented to the main window, which means sip transfers the ownership to the main window - and they are never deleted as a result. This results in various error messages caused by the widgets hanging around forever and listening out for various signals they are connected to.
This commit is contained in:
parent
77351fdba4
commit
5c844a5cfb
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user