Skip to content

Commit

Permalink
FEM: print console message if a task dialog is open already for beams…
Browse files Browse the repository at this point in the history
…ection and shellthickness
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Nov 7, 2015
1 parent ea6e65f commit 7847c6f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/Mod/Fem/_ViewProviderFemBeamSection.py
Expand Up @@ -68,7 +68,12 @@ def unsetEdit(self, vobj, mode=0):
return

def doubleClicked(self, vobj):
self.setEdit(vobj)
doc = FreeCADGui.getDocument(vobj.Object.Document)
if not doc.getInEdit():
doc.setEdit(vobj.Object.Name)
else:
FreeCAD.Console.PrintError('Active Task Dialog found! Please close this one first!\n')
return True

def __getstate__(self):
return None
Expand Down
7 changes: 6 additions & 1 deletion src/Mod/Fem/_ViewProviderFemShellThickness.py
Expand Up @@ -68,7 +68,12 @@ def unsetEdit(self, vobj, mode=0):
return

def doubleClicked(self, vobj):
self.setEdit(vobj)
doc = FreeCADGui.getDocument(vobj.Object.Document)
if not doc.getInEdit():
doc.setEdit(vobj.Object.Name)
else:
FreeCAD.Console.PrintError('Active Task Dialog found! Please close this one first!\n')
return True

def __getstate__(self):
return None
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/_ViewProviderMechanicalMaterial.py
Expand Up @@ -65,7 +65,7 @@ def doubleClicked(self, vobj):
if not doc.getInEdit():
doc.setEdit(vobj.Object.Name)
else:
FreeCAD.Console.PrintError('There is an active ViewProvider in EditMode! Please close this one!\n')
FreeCAD.Console.PrintError('Active Task Dialog found! Please close this one first!\n')
return True

def __getstate__(self):
Expand Down

0 comments on commit 7847c6f

Please sign in to comment.