diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index a3065fc10d..e0cbaf5260 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -374,6 +374,22 @@ void SoFCUnifiedSelection::doAction(SoAction *action) currenthighlight->unref(); currenthighlight = 0; } + } else if (hilaction->SelChange.Type == SelectionChanges::SetPreselect) { + App::Document* doc = App::GetApplication().getDocument(hilaction->SelChange.pDocName); + App::DocumentObject* obj = doc->getObject(hilaction->SelChange.pObjectName); + ViewProvider*vp = Application::Instance->getViewProvider(obj); + SoDetail* detail = vp->getDetail(hilaction->SelChange.pSubName); + SoHighlightElementAction action; + action.setHighlighted(true); + action.setColor(this->colorHighlight.getValue()); + action.setElement(detail); + action.apply(vp->getRoot()); + delete detail; + SoSearchAction sa; + sa.setNode(vp->getRoot()); + sa.apply(vp->getRoot()); + currenthighlight = static_cast(sa.getPath()->copy()); + currenthighlight->ref(); } } diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 3798afb28b..61add44527 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -643,7 +643,8 @@ void View3DInventorViewer::OnChange(Gui::SelectionSingleton::SubjectType& rCalle SoFCSelectionAction cAct(Reason); cAct.apply(pcViewProviderRoot); } - else if (Reason.Type == SelectionChanges::RmvPreselect) { + else if (Reason.Type == SelectionChanges::RmvPreselect || + Reason.Type == SelectionChanges::SetPreselect) { SoFCHighlightAction cAct(Reason); cAct.apply(pcViewProviderRoot); }