diff --git a/python/plugins/GdalTools/tools/dialogSRS.py b/python/plugins/GdalTools/tools/dialogSRS.py index c886053af202..ce2c4bdef233 100644 --- a/python/plugins/GdalTools/tools/dialogSRS.py +++ b/python/plugins/GdalTools/tools/dialogSRS.py @@ -5,7 +5,7 @@ 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 7c3384de7b84..fdb7150dee2d 100644 --- a/python/plugins/GdalTools/tools/doProjection.py +++ b/python/plugins/GdalTools/tools/doProjection.py @@ -84,7 +84,7 @@ def fillInputDir( self ): 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 a4d566acf959..e9d21bfeb79e 100644 --- a/python/plugins/GdalTools/tools/doTranslate.py +++ b/python/plugins/GdalTools/tools/doTranslate.py @@ -155,7 +155,7 @@ def refreshTargetSRS(self): 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 7b24bb51260d..52ca5f72b22e 100644 --- a/python/plugins/GdalTools/tools/doWarp.py +++ b/python/plugins/GdalTools/tools/doWarp.py @@ -141,7 +141,7 @@ def fillOutputDir( self ): 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 @@ def refreshSourceSRS(self): 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())