Gui: Disable Show Placement for Body Features
This commit is contained in:
committed by
Benjamin Nauck
parent
5dc2ba40ea
commit
a86c300688
@@ -184,6 +184,7 @@ ViewProviderPartExt::ViewProviderPartExt()
|
||||
Lighting.setEnums(LightingEnums);
|
||||
ADD_PROPERTY_TYPE(DrawStyle,((long int)0), osgroup, App::Prop_None, "Defines the style of the edges in the 3D view.");
|
||||
DrawStyle.setEnums(DrawStyleEnums);
|
||||
ADD_PROPERTY_TYPE(ShowPlacement,(false), "Display Options", App::Prop_None, "If true, placement of object is additionally rendered.");
|
||||
|
||||
coords = new SoCoordinate3();
|
||||
coords->ref();
|
||||
@@ -373,6 +374,9 @@ void ViewProviderPartExt::onChanged(const App::Property* prop)
|
||||
else
|
||||
pcLineStyle->linePattern = 0xff88;
|
||||
}
|
||||
else if (prop == &ShowPlacement) {
|
||||
pcPlacement->whichChild = (ShowPlacement.getValue() && Visibility.getValue()) ? SO_SWITCH_ALL : SO_SWITCH_NONE;
|
||||
}
|
||||
else {
|
||||
// if the object was invisible and has been changed, recreate the visual
|
||||
if (prop == &Visibility && (isUpdateForced() || Visibility.getValue()) && VisualTouched) {
|
||||
@@ -385,6 +389,7 @@ void ViewProviderPartExt::onChanged(const App::Property* prop)
|
||||
App::Property::NoModify, &ShapeAppearance);
|
||||
// The material has to be checked again (#0001736)
|
||||
onChanged(&ShapeAppearance);
|
||||
onChanged(&ShowPlacement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user