From 1deaeb0f7a9902f8a475454d33a7d0e72420e7a5 Mon Sep 17 00:00:00 2001 From: Salvatore Larosa Date: Sun, 3 Nov 2013 10:41:05 +0100 Subject: [PATCH] =?UTF-8?q?[ftools]=20disable=20add=20to=20canvas=20checkb?= =?UTF-8?q?ox=20=C3=ACf=20out=20file=20is=20not=20selected?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/plugins/fTools/tools/doGeometry.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/plugins/fTools/tools/doGeometry.py b/python/plugins/fTools/tools/doGeometry.py index 79c681cd4c3..ee188f3ee6f 100644 --- a/python/plugins/fTools/tools/doGeometry.py +++ b/python/plugins/fTools/tools/doGeometry.py @@ -181,9 +181,11 @@ class GeometryDialog( QDialog, Ui_Dialog ): if self.chkWriteShapefile.isChecked(): self.lineEdit.setEnabled( True ) self.toolOut.setEnabled( True ) + self.addToCanvasCheck.setEnabled( True ) else: self.lineEdit.setEnabled( False ) self.toolOut.setEnabled( False ) + self.addToCanvasCheck.setEnabled( False ) def populateLayers( self ): self.inShape.clear() @@ -567,7 +569,7 @@ class geometryThread( QThread ): atMap = inFeat.attributes() maxIndex = index1 if index1>index2 else index2 if maxIndex>len(atMap): - atMap += [ "" ] * ( index2+1 - len(atMap) ) + atMap += [ "" ] * ( index2+1 - len(atMap) ) atMap[ index1 ] = attr1 if index1!=index2: atMap[ index2 ] = attr2