}
myMainObj = anObj;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
- // activate subshapes selection by default
+ // activate sub-shapes selection by default
myEditCurrentArgument = 0;
activateSelection();
updateState();
GEOM_Displayer* aDisplayer = getDisplayer();
if (send == myHideSelBtn) {
- aDisplayer->Erase(aSelList, false, true);
+ aDisplayer->Erase(aSelList, /*forced=*/false, /*updateViewer=*/true);
}
else {
- aDisplayer->EraseAll();
+ // Mantis issue 0021421: do not hide main shape, if explode on VERTEX
+ SALOME_View* view = GEOM_Displayer::GetActiveView();
+ if (view) {
+ CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+ Handle(SALOME_InteractiveObject) io =
+ new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
+ if (view->isVisible(io)) myIsHiddenMain = true;
+ }
+
+ aDisplayer->EraseAll(/*forced = false, updateViewer = true*/);
aDisplayer->Display(aSelList, true);
+
+ // Mantis issue 0021421: do not hide main shape, if explode on VERTEX
+ if (getShapeType() == TopAbs_VERTEX && myIsHiddenMain) {
+ aDisplayer->Display(myMainObj);
+ }
+
+ // for the case when selected ids were not displayed in the viewer: Mantis issue 0021367
+ highlightSubShapes();
}
}
myIsShapeType) // check if shape type is already choosen by user
{
GEOM_Displayer* aDisplayer = getDisplayer();
- SALOME_View* view = GEOM_Displayer::GetActiveView();
- if (view) {
- CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
- Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
- if (view->isVisible(io)) {
- aDisplayer->Erase(myMainObj, false, false);
- myIsHiddenMain = true;
+
+ // Mantis issue 0021421: do not hide main shape, if explode on VERTEX
+ if (getShapeType() == TopAbs_VERTEX) {
+ if (myIsHiddenMain)
+ aDisplayer->Display(myMainObj);
+ }
+ else {
+ SALOME_View* view = GEOM_Displayer::GetActiveView();
+ if (view) {
+ CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+ Handle(SALOME_InteractiveObject) io =
+ new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
+ if (view->isVisible(io)) {
+ aDisplayer->Erase(myMainObj, false, false);
+ myIsHiddenMain = true;
+ }
}
}
SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
if (aPrs) {
displayPreview(aPrs, true, false); // append, do not update
+ // TODO: map or delete Prs
}
}
}
SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
if (aView == 0) return;
- // TODO: use here GEOMBase_Helper::myPreview instead of ic->DisplayedObjects()
+ // TODO??: use here GEOMBase_Helper::myPreview instead of ic->DisplayedObjects()
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)aViewManager)->getOCCViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
AIS_ListOfInteractive List;
- ic->DisplayedObjects(List);
+ //ic->DisplayedObjects(List);
+ ic->ObjectsInside(List); // Mantis issue 0021367
SALOME_ListIO aSelList;
- // To highlight the selected subshape in Object Browser, if it's already pudlished under the main shape
+ // To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
QMap<int, QString> childsMap;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());