diff --git a/src/Gui/Selection/SoFCUnifiedSelection.cpp b/src/Gui/Selection/SoFCUnifiedSelection.cpp index 719e384139..0fd85e0ef1 100644 --- a/src/Gui/Selection/SoFCUnifiedSelection.cpp +++ b/src/Gui/Selection/SoFCUnifiedSelection.cpp @@ -113,12 +113,12 @@ SoFCUnifiedSelection::SoFCUnifiedSelection() { SO_NODE_CONSTRUCTOR(SoFCUnifiedSelection); - SO_NODE_ADD_FIELD(colorHighlight, (SbColor(1.0f, 0.6f, 0.0f))); - SO_NODE_ADD_FIELD(colorSelection, (SbColor(0.1f, 0.8f, 0.1f))); - SO_NODE_ADD_FIELD(highlightMode, (AUTO)); - SO_NODE_ADD_FIELD(selectionMode, (ON)); - SO_NODE_ADD_FIELD(selectionRole, (true)); - SO_NODE_ADD_FIELD(useNewSelection, (true)); + SO_NODE_ADD_FIELD(colorHighlight, (SbColor(1.0f, 0.6f, 0.0f))); + SO_NODE_ADD_FIELD(colorSelection, (SbColor(0.1f, 0.8f, 0.1f))); + SO_NODE_ADD_FIELD(highlightMode, (AUTO)); + SO_NODE_ADD_FIELD(selectionMode, (ON)); + SO_NODE_ADD_FIELD(selectionEnabled, (true)); + SO_NODE_ADD_FIELD(useNewSelection, (true)); SO_NODE_DEFINE_ENUM_VALUE(HighlightModes, AUTO); SO_NODE_DEFINE_ENUM_VALUE(HighlightModes, ON); @@ -729,7 +729,7 @@ void SoFCUnifiedSelection::handleEvent(SoHandleEventAction * action) { // If off then don't handle this event - if (!selectionRole.getValue()) { + if (!selectionEnabled.getValue()) { inherited::handleEvent(action); return; } diff --git a/src/Gui/Selection/SoFCUnifiedSelection.h b/src/Gui/Selection/SoFCUnifiedSelection.h index ad22f37411..b400d9a9ce 100644 --- a/src/Gui/Selection/SoFCUnifiedSelection.h +++ b/src/Gui/Selection/SoFCUnifiedSelection.h @@ -76,7 +76,7 @@ public: SoSFColor colorSelection; SoSFEnum highlightMode; SoSFEnum selectionMode; - SoSFBool selectionRole; + SoSFBool selectionEnabled; SoSFBool useNewSelection; void doAction(SoAction *action) override; diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 7f0d238e5d..9f677de628 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1798,14 +1798,12 @@ const std::vector& View3DInventorViewer::getPolygon(SelectionRole* role void View3DInventorViewer::setSelectionEnabled(bool enable) { - SoNode* root = getSceneGraph(); - static_cast(root)->selectionRole.setValue(enable); // NOLINT + this->selectionRoot->selectionEnabled.setValue(enable); // NOLINT } bool View3DInventorViewer::isSelectionEnabled() const { - SoNode* root = getSceneGraph(); - return static_cast(root)->selectionRole.getValue(); // NOLINT + return this->selectionRoot->selectionEnabled.getValue(); // NOLINT } SbVec2f View3DInventorViewer::screenCoordsOfPath(SoPath* path) const