Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] make Modeller non-blocking window
  • Loading branch information
alexbruy committed Jan 20, 2016
1 parent f7e6fa6 commit 51ec2bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -147,6 +147,7 @@ def openToolbox(self):

def openModeler(self):
dlg = ModelerDialog()
dlg.show()
dlg.exec_()

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Jan 20, 2016

Member

Shouldn't the exec call be removed? According to the doc, this makes it modal.

This comment has been minimized.

Copy link
@alexbruy

alexbruy Jan 20, 2016

Author Contributor

If exec_() removed than dialog does not displayed. Currently Modeller and Resuls dialogs are non-modal and don't block QGIS main window.

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Jan 20, 2016

Member

Strange, QDialogs behave differently when I create them in a python console, but as long as it works ...

This comment has been minimized.

Copy link
@SebDieBln

SebDieBln Jan 20, 2016

Contributor

@alexbruy

dialog is not displayed

Did you take into account that dlg is a local variable and as such is deleted as soon as openModeler() finishes?

I recently had to fix the same mistake for one of our plugins at work, too 😄

@m-kuhn

but as long as it works

Hm, I don't quite concur. But that would be off-topic here.

if dlg.update:
self.toolbox.updateProvider('model')
Expand Down

0 comments on commit 51ec2bf

Please sign in to comment.