[FEM] fix activation of post pipeline

it can only be activated if a result object is selected from which the pipeline can be loaded
This commit is contained in:
Uwe
2022-03-27 00:22:06 +01:00
parent 83753534b9
commit 1b7b72ea90

View File

@@ -1712,7 +1712,9 @@ void CmdFemPostPipelineFromResult::activated(int)
bool CmdFemPostPipelineFromResult::isActive(void)
{
return hasActiveDocument();
// only activate if a result object is selected from which the pipeline can be loaded
std::vector<Fem::FemResultObject*> results = getSelection().getObjectsOfType<Fem::FemResultObject>();
return (results.size() == 1) ? true : false;
}
#endif