for point clouds set default selection style to bounding box

This commit is contained in:
wmayer
2019-11-23 15:46:27 +01:00
parent 10831dc70a
commit e25c848554

View File

@@ -81,6 +81,9 @@ ViewProviderPoints::ViewProviderPoints()
if (pcHighlight->selectionMode.getValue() == Gui::SoFCSelection::SEL_OFF)
Selectable.setValue(false);
// BBOX
SelectionStyle.setValue(1);
pcPointsCoord = new SoCoordinate3();
pcPointsCoord->ref();
pcPointsNormal = new SoNormal();
@@ -108,6 +111,10 @@ void ViewProviderPoints::onChanged(const App::Property* prop)
if (prop == &PointSize) {
pcPointStyle->pointSize = PointSize.getValue();
}
else if (prop == &SelectionStyle) {
pcHighlight->style = SelectionStyle.getValue() ? Gui::SoFCSelection::BOX
: Gui::SoFCSelection::EMISSIVE;
}
else {
ViewProviderGeometryObject::onChanged(prop);
}