Only allow editing of toolbit if shapefile is found

This commit is contained in:
sliptonic
2020-11-14 12:06:25 -06:00
parent 472cb83ae7
commit 2da3308bc3

View File

@@ -113,7 +113,14 @@ class ViewProvider(object):
return []
def doubleClicked(self, vobj):
self.setEdit(vobj)
if os.path.exists(vobj.Object.BitShape):
self.setEdit(vobj)
else:
msg = translate('PathToolBit',
'Toolbit cannot be edited: Shapefile not found')
diag = QtGui.QMessageBox(QtGui.QMessageBox.Warning, 'Error', msg)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()
class TaskPanel: