Skip to content

Commit

Permalink
Use correct stylesheet for processing dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 25, 2018
1 parent afd7b92 commit 6d1a929
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/gui/AlgorithmDialog.py
Expand Up @@ -66,8 +66,9 @@

class AlgorithmDialog(QgsProcessingAlgorithmDialogBase):

def __init__(self, alg, in_place=False):
super().__init__()
def __init__(self, alg, in_place=False, parent=None):
super().__init__(parent)

self.feedback_dialog = None
self.in_place = in_place

Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/gui/BatchAlgorithmDialog.py
Expand Up @@ -45,7 +45,7 @@
QgsScopedProxyProgressTask)

from qgis.gui import QgsProcessingAlgorithmDialogBase
from qgis.utils import OverrideCursor
from qgis.utils import OverrideCursor, iface

from processing.gui.BatchPanel import BatchPanel
from processing.gui.AlgorithmExecutor import execute
Expand All @@ -61,8 +61,8 @@

class BatchAlgorithmDialog(QgsProcessingAlgorithmDialogBase):

def __init__(self, alg):
super().__init__()
def __init__(self, alg, parent=None):
super().__init__(parent)

self.setAlgorithm(alg)

Expand Down
6 changes: 4 additions & 2 deletions python/plugins/processing/gui/ProcessingToolbox.py
Expand Up @@ -212,7 +212,8 @@ def activateCurrent(self):
def executeAlgorithmAsBatchProcess(self):
alg = self.algorithmTree.selectedAlgorithm().create() if self.algorithmTree.selectedAlgorithm() is not None else None
if alg is not None:
dlg = BatchAlgorithmDialog(alg)
dlg = BatchAlgorithmDialog(alg, iface.mainWindow())
dlg.setAttribute(Qt.WA_DeleteOnClose)
dlg.show()
dlg.exec_()

Expand Down Expand Up @@ -243,7 +244,8 @@ def executeAlgorithm(self):
dlg = alg.createCustomParametersWidget(self)

if not dlg:
dlg = AlgorithmDialog(alg, self.in_place_mode)
dlg = AlgorithmDialog(alg, self.in_place_mode, iface.mainWindow())
dlg.setAttribute(Qt.WA_DeleteOnClose)
canvas = iface.mapCanvas()
prevMapTool = canvas.mapTool()
dlg.show()
Expand Down

0 comments on commit 6d1a929

Please sign in to comment.