From df2d80195d1582268798a1002c15c10f0f9198b2 Mon Sep 17 00:00:00 2001 From: Giuseppe Sucameli Date: Wed, 1 Feb 2012 13:01:22 +0100 Subject: [PATCH] set parent opening projection selector dialog (fix #4931) --- python/plugins/GdalTools/tools/dialogSRS.py | 2 +- python/plugins/GdalTools/tools/doProjection.py | 2 +- python/plugins/GdalTools/tools/doTranslate.py | 2 +- python/plugins/GdalTools/tools/doWarp.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/plugins/GdalTools/tools/dialogSRS.py b/python/plugins/GdalTools/tools/dialogSRS.py index c886053af20..ce2c4bdef23 100644 --- a/python/plugins/GdalTools/tools/dialogSRS.py +++ b/python/plugins/GdalTools/tools/dialogSRS.py @@ -5,7 +5,7 @@ from qgis.core import * from qgis.gui import * class GdalToolsSRSDialog(QDialog): - def __init__(self, title, parent): + def __init__(self, title, parent=None): QDialog.__init__(self, parent) self.setWindowTitle( title ) diff --git a/python/plugins/GdalTools/tools/doProjection.py b/python/plugins/GdalTools/tools/doProjection.py index 7c3384de7b8..fdb7150dee2 100644 --- a/python/plugins/GdalTools/tools/doProjection.py +++ b/python/plugins/GdalTools/tools/doProjection.py @@ -84,7 +84,7 @@ class GdalToolsDialog( QWidget, Ui_Widget, BaseBatchWidget ): self.inSelector.setFilename( inputDir ) def fillDesiredSRSEdit( self ): - dialog = SRSDialog( "Select desired SRS" ) + dialog = SRSDialog( "Select desired SRS", self ) if dialog.exec_(): self.desiredSRSEdit.setText( dialog.getProjection() ) diff --git a/python/plugins/GdalTools/tools/doTranslate.py b/python/plugins/GdalTools/tools/doTranslate.py index a4d566acf95..e9d21bfeb79 100644 --- a/python/plugins/GdalTools/tools/doTranslate.py +++ b/python/plugins/GdalTools/tools/doTranslate.py @@ -155,7 +155,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget): self.targetSRSEdit.setText( Utils.getRasterSRS( self, self.getInputFileName() ) ) def fillTargetSRSEdit(self): - dialog = SRSDialog( "Select the target SRS" ) + dialog = SRSDialog( "Select the target SRS", self ) if dialog.exec_(): self.targetSRSEdit.setText(dialog.getProjection()) diff --git a/python/plugins/GdalTools/tools/doWarp.py b/python/plugins/GdalTools/tools/doWarp.py index 7b24bb51260..52ca5f72b22 100644 --- a/python/plugins/GdalTools/tools/doWarp.py +++ b/python/plugins/GdalTools/tools/doWarp.py @@ -141,7 +141,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget): self.outSelector.setFilename( outputDir ) def fillSourceSRSEdit(self): - dialog = SRSDialog( "Select the source SRS" ) + dialog = SRSDialog( "Select the source SRS", self ) if dialog.exec_(): self.sourceSRSEdit.setText(dialog.getProjection()) @@ -156,7 +156,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget): self.sourceSRSCheck.setChecked( not crs.isEmpty() ) def fillTargetSRSEdit(self): - dialog = SRSDialog( "Select the target SRS" ) + dialog = SRSDialog( "Select the target SRS", self ) if dialog.exec_(): self.targetSRSEdit.setText(dialog.getProjection())