- // Activate selection of objects from prs
- AIS_ListIteratorOfListOfInteractive aIter(theAISObjects);
- for (; aIter.More(); aIter.Next()) {
- Handle(AIS_InteractiveObject) anAIS = aIter.Value();
- if (!anAIS.IsNull()) {
- if (anAIS->IsKind(STANDARD_TYPE(AIS_Shape))) {
- ic->Load(anAIS, -1, false);
- ic->Activate(anAIS, AIS_Shape::SelectionMode((TopAbs_ShapeEnum)theMode));
- }
- else if (anAIS->DynamicType() != STANDARD_TYPE(AIS_Trihedron)) {
- ic->Load(anAIS, -1, false);
- ic->Activate(anAIS, theMode);
- }
- }
- }
- if (isUpdateViewer)
- ic->UpdateCurrentViewer();
+void XGUI_Viewer::getSelectedObjects(AIS_ListOfInteractive& theList)
+{
+ theList.Clear();
+ for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
+ theList.Append(myAISContext->SelectedInteractive());