Skip to content
Permalink
Browse files
show warning before updating exisiting shapefile (fix #5335)
  • Loading branch information
alexbruy authored and jef-n committed May 17, 2012
1 parent d6ea1b9 commit 52a35edd07a91134badca081376e33c9132c28a3
Showing with 16 additions and 0 deletions.
  1. +8 −0 python/plugins/fTools/tools/doGeometry.py
  2. +8 −0 python/plugins/fTools/tools/doSimplify.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,
@@ -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 )

0 comments on commit 52a35ed

Please sign in to comment.