From da7d499595804c954023d06507e911bdc74c7b02 Mon Sep 17 00:00:00 2001 From: Przemo Firszt Date: Thu, 15 Oct 2015 13:10:22 +0100 Subject: [PATCH] FEM: Constraints should be enabled only when there is an active analysis Signed-off-by: Przemo Firszt --- src/Mod/Fem/Gui/Command.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 0353cabede..5c6f03a4c7 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -240,7 +240,7 @@ void CmdFemConstraintBearing::activated(int iMsg) bool CmdFemConstraintBearing::isActive(void) { - return hasActiveDocument(); + return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject(); } //===================================================================================== @@ -278,7 +278,7 @@ void CmdFemConstraintFixed::activated(int iMsg) bool CmdFemConstraintFixed::isActive(void) { - return hasActiveDocument(); + return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject(); } //===================================================================================== @@ -317,7 +317,7 @@ void CmdFemConstraintForce::activated(int iMsg) bool CmdFemConstraintForce::isActive(void) { - return hasActiveDocument(); + return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject(); } //===================================================================================== @@ -357,7 +357,7 @@ void CmdFemConstraintPressure::activated(int iMsg) bool CmdFemConstraintPressure::isActive(void) { - return hasActiveDocument(); + return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject(); } //===================================================================================== @@ -395,7 +395,7 @@ void CmdFemConstraintGear::activated(int iMsg) bool CmdFemConstraintGear::isActive(void) { - return hasActiveDocument(); + return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject(); } //===================================================================================== @@ -438,7 +438,7 @@ void CmdFemConstraintPulley::activated(int iMsg) bool CmdFemConstraintPulley::isActive(void) { - return hasActiveDocument(); + return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject(); } // #####################################################################################################