Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PD ui: Fix Primitive combobuttons icons remember last choice
  • Loading branch information
usakhelo authored and wwmayer committed Aug 22, 2016
1 parent 4ba5388 commit 52b98f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Mod/PartDesign/Gui/CommandPrimitive.cpp
Expand Up @@ -63,6 +63,9 @@ void CmdPrimtiveCompAdditive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;

Gui::ActionGroup* pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
pcAction->setIcon(pcAction->actions().at(iMsg)->icon());

std::string FeatName;
std::string CSName = getUniqueObjectName("CoordinateSystem");;
if(iMsg == 0) {
Expand Down Expand Up @@ -249,6 +252,9 @@ void CmdPrimtiveCompSubtractive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;

Gui::ActionGroup* pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
pcAction->setIcon(pcAction->actions().at(iMsg)->icon());

//check if we already have a feature as subtractive ones work only if we have
//something to subtract from.
App::DocumentObject *prevSolid = pcActiveBody->Tip.getValue();
Expand Down

0 comments on commit 52b98f9

Please sign in to comment.