From 70318d78206f62f6593573e7b31f311a49ac9ac1 Mon Sep 17 00:00:00 2001 From: Przemo Firszt Date: Thu, 30 Apr 2015 22:13:28 +0100 Subject: [PATCH] FEM: Disable Show result button if there are no results in analysis Signed-off-by: Przemo Firszt --- src/Mod/Fem/MechanicalAnalysis.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Fem/MechanicalAnalysis.py b/src/Mod/Fem/MechanicalAnalysis.py index 430b308c3..c65ebea7d 100644 --- a/src/Mod/Fem/MechanicalAnalysis.py +++ b/src/Mod/Fem/MechanicalAnalysis.py @@ -174,8 +174,7 @@ class _CommandMechanicalShowResult: FreeCADGui.Control.showDialog(taskd) def IsActive(self): - import FemGui - return FreeCADGui.ActiveDocument is not None and FemGui.getActiveAnalysis() is not None + return FreeCADGui.ActiveDocument is not None and results_present() class _FemAnalysis: