diff --git a/python/plugins/fTools/tools/doGeometry.py b/python/plugins/fTools/tools/doGeometry.py index 12c6ffe50337..d2441541437c 100644 --- a/python/plugins/fTools/tools/doGeometry.py +++ b/python/plugins/fTools/tools/doGeometry.py @@ -232,6 +232,14 @@ def geometry( self, myLayer, myParam, myField ): self.shapefileName = None self.encoding = None + res = QMessageBox.warning( self, self.tr( "Geometry"), + self.tr( "Currently QGIS doesn't allow simultaneous access from \ + different threads to the same datasource. Make sure your layer's \ + attribute tables are closed. Continue?"), + QMessageBox.Yes | QMessageBox.No ) + if res == QMessageBox.No: + return + self.buttonOk.setEnabled( False ) self.testThread = geometryThread( self.iface.mainWindow(), self, self.myFunction, vlayer, myParam, myField, self.shapefileName, self.encoding, diff --git a/python/plugins/fTools/tools/doSimplify.py b/python/plugins/fTools/tools/doSimplify.py index 276e233cdb7c..025d234999c7 100644 --- a/python/plugins/fTools/tools/doSimplify.py +++ b/python/plugins/fTools/tools/doSimplify.py @@ -104,6 +104,14 @@ def accept( self ): self.workThread = GeomThread( self.myFunction, vLayer, self.chkUseSelection.isChecked(), self.spnTolerance.value(), True, outFileName, self.encoding ) else: + res = QMessageBox.warning( self, self.tr( "Warning"), + self.tr( "Currently QGIS doesn't allow simultaneous access from \ + different threads to the same datasource. Make sure your layer's \ + attribute tables are closed. Continue?"), + QMessageBox.Yes | QMessageBox.No ) + if res == QMessageBox.No: + return + self.workThread = GeomThread( self.myFunction, vLayer, self.chkUseSelection.isChecked(), self.spnTolerance.value(), False, None, None )