From 1b7b72ea90f292816767a6b0f8a3c3f9abb47b08 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 27 Mar 2022 00:22:06 +0100 Subject: [PATCH] [FEM] fix activation of post pipeline it can only be activated if a result object is selected from which the pipeline can be loaded --- src/Mod/Fem/Gui/Command.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index f5817dca0f..f99b7e33b5 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -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 results = getSelection().getObjectsOfType(); + return (results.size() == 1) ? true : false; } #endif