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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ public:
|
||||
App::PropertyAngle AngularDeflection;
|
||||
App::PropertyEnumeration Lighting;
|
||||
App::PropertyEnumeration DrawStyle;
|
||||
/// Property controlling visibility of the placement indicator, useful for displaying origin
|
||||
/// position of attached Document Object.
|
||||
App::PropertyBool ShowPlacement;
|
||||
// Points
|
||||
App::PropertyFloatConstraint PointSize;
|
||||
|
||||
@@ -238,7 +238,7 @@ QIcon ViewProvider::mergeColorfulOverlayIcons (const QIcon & orig) const
|
||||
return Gui::ViewProvider::mergeColorfulOverlayIcons (mergedicon);
|
||||
}
|
||||
|
||||
bool ViewProvider::onDelete(const std::vector<std::string> &)
|
||||
bool ViewProvider::onDelete(const std::vector<std::string>&)
|
||||
{
|
||||
PartDesign::Feature* feature = getObject<PartDesign::Feature>();
|
||||
|
||||
|
||||
@@ -282,6 +282,7 @@ void ViewProviderBody::unifyVisualProperty(const App::Property* prop) {
|
||||
prop == &Selectable ||
|
||||
prop == &DisplayModeBody ||
|
||||
prop == &PointColorArray ||
|
||||
prop == &ShowPlacement ||
|
||||
prop == &LineColorArray) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user