Skip to content

Commit

Permalink
FEM: Constraints should be enabled only when there is an active analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF authored and wwmayer committed Oct 19, 2015
1 parent eda566e commit da7d499
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Mod/Fem/Gui/Command.cpp
Expand Up @@ -240,7 +240,7 @@ void CmdFemConstraintBearing::activated(int iMsg)

bool CmdFemConstraintBearing::isActive(void)
{
return hasActiveDocument();
return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
}

//=====================================================================================
Expand Down Expand Up @@ -278,7 +278,7 @@ void CmdFemConstraintFixed::activated(int iMsg)

bool CmdFemConstraintFixed::isActive(void)
{
return hasActiveDocument();
return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
}

//=====================================================================================
Expand Down Expand Up @@ -317,7 +317,7 @@ void CmdFemConstraintForce::activated(int iMsg)

bool CmdFemConstraintForce::isActive(void)
{
return hasActiveDocument();
return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
}

//=====================================================================================
Expand Down Expand Up @@ -357,7 +357,7 @@ void CmdFemConstraintPressure::activated(int iMsg)

bool CmdFemConstraintPressure::isActive(void)
{
return hasActiveDocument();
return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
}

//=====================================================================================
Expand Down Expand Up @@ -395,7 +395,7 @@ void CmdFemConstraintGear::activated(int iMsg)

bool CmdFemConstraintGear::isActive(void)
{
return hasActiveDocument();
return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
}

//=====================================================================================
Expand Down Expand Up @@ -438,7 +438,7 @@ void CmdFemConstraintPulley::activated(int iMsg)

bool CmdFemConstraintPulley::isActive(void)
{
return hasActiveDocument();
return FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
}

// #####################################################################################################
Expand Down

0 comments on commit da7d499

Please sign in to comment.