Skip to content

Commit

Permalink
[FEM] set default selection mode to BoundBox for post objects
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
donovaly committed Jul 24, 2022
1 parent 4efbc14 commit 864c9ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Fem/Gui/Command.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 864c9ec

Please sign in to comment.