show warning before updating exisiting shapefile (fix #5335)

This commit is contained in:
Alexander Bruy 2012-05-16 17:23:38 +03:00
parent a1255fce34
commit d18529fc26
2 changed files with 16 additions and 0 deletions

View File

@ -232,6 +232,14 @@ class GeometryDialog( QDialog, Ui_Dialog ):
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,

View File

@ -104,6 +104,14 @@ class Dialog( QDialog, Ui_Dialog ):
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 )