Skip to content

Commit ddd12e2

Browse files
authored
Merge pull request #6895 from gacarrillor/avoid_unnecessary_confirmation_dialogs
[processing] Refactor Fields algorithm: avoid unnecessary confirmation dialogs
2 parents 12183e9 + f07cd2f commit ddd12e2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ def setDelegate(self, column_name, delegate):
325325
delegate)
326326

327327
def setLayer(self, layer):
328+
if self.model.layer() == layer:
329+
return
328330
self.model.setLayer(layer)
329331
if layer is None:
330332
return

python/plugins/processing/tools/general.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,6 @@ def execAlgorithmDialog(algOrName, parameters={}):
154154
canvas.setMapTool(prevMapTool)
155155

156156
results = dlg.results()
157+
# make sure the dialog is destroyed and not only hidden on pressing Esc
158+
dlg.close()
157159
return results

0 commit comments

Comments
 (0)