fixes #0003256: additive elements do not use color of Body
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user