From a5b50fd114fb4f9265f6f7f70e9ac6036164bbcf Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 24 Jul 2022 16:24:01 +0200 Subject: [PATCH] [FEM] set default selection mode to BoundBox for post objects - this fixes a long-standing annoyance that popped up also from time to time in the forum: the post objects deliver information via its coloring but a selection in the tree changed the shape color Even experienced users like me did not know about the SelectionStyle property and always had to click into the model to see the real color, not the selection color. Therefore SelectionStyle set to BoundBox is sensible as default settings for post objects since this assures that the users always see the right coloring. --- src/Mod/Fem/Gui/Command.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 113eab5a83..d4bfd8bd68 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -1202,6 +1202,10 @@ void setupFilter(Gui::Command* cmd, std::string Name) { // set display to assure the user sees the new object cmd->doCommand(Gui::Command::Doc, "App.activeDocument().ActiveObject.ViewObject.DisplayMode = \"Surface\""); + // Set SelectionStyle to BoundBox because the idea is that the user gets the useful result + // from the colors. The default would be to highlight the shape but then the colors are changed + // by every highlighting leading to confusions for the user. + cmd->doCommand(Gui::Command::Doc, "App.activeDocument().ActiveObject.ViewObject.SelectionStyle = \"BoundBox\""); // in case selObject is no pipeline we must set it as input object auto objFilter = App::GetApplication().getActiveDocument()->getActiveObject(); @@ -1849,6 +1853,10 @@ void CmdFemPostPipelineFromResult::activated(int) "App.activeDocument().getObject(\"%s\"))", results[0]->getNameInDocument()); // set display to assure the user sees the new object doCommand(Doc, "App.activeDocument().ActiveObject.ViewObject.DisplayMode = \"Surface\""); + // Set SelectionStyle to BoundBox because the idea is that the user gets the useful result + // from the colors. The default would be to highlight the shape but then the colors are changed + // by every highlighting leading to confusions for the user. + doCommand(Doc, "App.activeDocument().ActiveObject.ViewObject.SelectionStyle = \"BoundBox\""); commitCommand(); this->updateActive();