+ case GEOMOp::OpReimport: // RELOAD IMPORTED SHAPE
+ {
+ SalomeApp_Study* anAppStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+
+ GEOM::GEOM_ITransformOperations_var anOp =
+ GeometryGUI::GetGeomGen()->GetITransformOperations(anAppStudy->id());
+ if (anOp->_is_nil()) return false;
+
+ GEOM_Displayer aDisp (anAppStudy);
+ SUIT_Desktop* desk = app->desktop();
+ QList<SUIT_ViewWindow*> wnds = desk->windows();
+
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ SALOME_ListIO aSelList;
+ aSelMgr->selectedObjects(aSelList);
+
+ SALOME_ListIteratorOfListIO aSelIt (aSelList);
+ for (; aSelIt.More(); aSelIt.Next()) {
+ Handle(SALOME_InteractiveObject) io = aSelIt.Value();
+ Standard_Boolean testResult = Standard_False;
+ GEOM::GEOM_Object_var aGeomObj = GEOMBase::ConvertIOinGEOMObject(io, testResult);
+ if (testResult) {
+ anOp->RecomputeObject(aGeomObj);
+
+ SUIT_ViewWindow* wnd;
+ QListIterator<SUIT_ViewWindow*> it (wnds);
+ while (it.hasNext() && (wnd = it.next()))
+ {
+ if (SUIT_ViewManager* vman = wnd->getViewManager()) {
+ if (SUIT_ViewModel* vmodel = vman->getViewModel()) {
+ if (SALOME_View* view = dynamic_cast<SALOME_View*>(vmodel)) {
+ if (view->isVisible(io)) {
+ aDisp.Erase(io, false, false, view);
+ aDisp.Display(io, true, view);
+ }
+ // ? Redisplay subshapes ?
+ }
+ }
+ }
+ }
+ }
+ } // for (; aSelIt.More(); aSelIt.Next())
+ }