Clear existing preselects when setting a new preselect

This commit is contained in:
Dion Moult
2019-02-24 10:22:48 +11:00
committed by Yorik van Havre
parent 7da48b3307
commit 985dbaead8

View File

@@ -375,6 +375,12 @@ void SoFCUnifiedSelection::doAction(SoAction *action)
currenthighlight = 0;
}
} else if (hilaction->SelChange.Type == SelectionChanges::SetPreselect) {
if (currenthighlight) {
SoHighlightElementAction action;
action.apply(currenthighlight);
currenthighlight->unref();
currenthighlight = 0;
}
App::Document* doc = App::GetApplication().getDocument(hilaction->SelChange.pDocName);
App::DocumentObject* obj = doc->getObject(hilaction->SelChange.pObjectName);
ViewProvider*vp = Application::Instance->getViewProvider(obj);