fixes #0003256: additive elements do not use color of Body

This commit is contained in:
wmayer
2018-06-10 10:12:32 +02:00
parent b0e869174d
commit af2ebf86ff
2 changed files with 17 additions and 1 deletions

View File

@@ -593,7 +593,7 @@ void CmdPartDesignMoveTip::activated(int iMsg)
App::DocumentObject* oldTip = body->Tip.getValue();
if (oldTip == selFeature) { // it's not generally an error, so print only a console message
Base::Console().Message ("%s is already the tip of the body", selFeature->getNameInDocument () );
Base::Console().Message ("%s is already the tip of the body\n", selFeature->getNameInDocument () );
return;
}

View File

@@ -118,6 +118,14 @@ void CmdPrimtiveCompAdditive::activated(int iMsg)
if (prm->BaseFeature.getValue())
doCommand(Gui,"Gui.activeDocument().hide(\"%s\")", prm->BaseFeature.getValue()->getNameInDocument());
if (pcActiveBody) {
copyVisual(FeatName.c_str(), "ShapeColor", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "LineColor", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "PointColor", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "Transparency", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "DisplayMode", pcActiveBody->getNameInDocument());
}
Gui::Command::doCommand(Gui, "Gui.activeDocument().setEdit(\'%s\')", FeatName.c_str());
}
@@ -275,6 +283,14 @@ void CmdPrimtiveCompSubtractive::activated(int iMsg)
}
}
if (pcActiveBody) {
copyVisual(FeatName.c_str(), "ShapeColor", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "LineColor", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "PointColor", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "Transparency", pcActiveBody->getNameInDocument());
copyVisual(FeatName.c_str(), "DisplayMode", pcActiveBody->getNameInDocument());
}
Gui::Command::doCommand(Gui, "Gui.activeDocument().setEdit(\'%s\')", FeatName.c_str());
}