+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
#include "XGUI_SelectionMgr.h"
#include "XGUI_Workshop.h"
connect(myWorkshop->viewer(), SIGNAL(selectionChanged()), this, SLOT(onViewerSelection()));
}
+//**************************************************************
+void XGUI_SelectionMgr::setSelectedOwners(const SelectMgr_IndexedMapOfOwner& theSelectedOwners,
+ bool isUpdateViewer)
+{
+ SelectMgr_IndexedMapOfOwner aSelectedOwners;
+ selection()->selectedOwners(aSelectedOwners);
+
+ Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
+ for (Standard_Integer i = 1, n = theSelectedOwners.Extent(); i <= n; i++) {
+ Handle(SelectMgr_EntityOwner) anOwner = theSelectedOwners(i);
+ if (aSelectedOwners.FindIndex(anOwner) > 0)
+ continue;
+
+ aContext->AddOrRemoveSelected(anOwner, isUpdateViewer);
+ }
+}
+
//**************************************************************
void XGUI_SelectionMgr::onObjectBrowserSelection()
{