FEM: Python object VP, add a pop up if a task panel is open while another one will be opened
This commit is contained in:
@@ -80,11 +80,15 @@ class _ViewProviderFemElementGeometry2D:
|
||||
return
|
||||
|
||||
def doubleClicked(self, vobj):
|
||||
doc = FreeCADGui.getDocument(vobj.Object.Document)
|
||||
if not doc.getInEdit():
|
||||
doc.setEdit(vobj.Object.Name)
|
||||
guidoc = FreeCADGui.getDocument(vobj.Object.Document)
|
||||
# check if another VP is in edit mode, https://forum.freecadweb.org/viewtopic.php?t=13077#p104702
|
||||
if not guidoc.getInEdit():
|
||||
guidoc.setEdit(vobj.Object.Name)
|
||||
else:
|
||||
FreeCAD.Console.PrintError('Active Task Dialog found! Please close this one first!\n')
|
||||
from PySide.QtGui import QMessageBox
|
||||
message = 'Active Task Dialog found! Please close this one before open a new one!'
|
||||
QMessageBox.critical(None, "Error in tree view", message)
|
||||
FreeCAD.Console.PrintError(message + '\n')
|
||||
return True
|
||||
|
||||
def __getstate__(self):
|
||||
|
||||
Reference in New Issue
Block a user