mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
show warning before updating exisiting shapefile (fix #5335)
This commit is contained in:
parent
a1255fce34
commit
d18529fc26
@ -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,
|
||||
|
@ -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 )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user