Fixed a regression: wrong display of shape by choosing different shape type when exploding a shape

This commit is contained in:
mpa 2014-01-17 10:06:21 +00:00
parent 96ecf49b16
commit ac4bdd2286

View File

@ -739,24 +739,21 @@ void EntityGUI_SubShapeDlg::activateSelection()
new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
if ( view->isVisible( io ) ) { if ( view->isVisible( io ) ) {
Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIOinGEOMAISShape( io, true ); Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIOinGEOMAISShape( io, true );
if(!aSh.IsNull()) { if(!aSh.IsNull())
myDmMode = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode(); myDmMode = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode();
} }
// Hide main shape, if explode on VERTEX
if (shapeType() != TopAbs_VERTEX) {
aDisplayer->Erase(myObject, false, false);
myIsHiddenMain = true;
}
}
else else
myDmMode = SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "display_mode" ); myDmMode = SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "display_mode" );
} }
} }
// Mantis issue 0021421: do not hide main shape, if explode on VERTEX // Mantis issue 0021421: do not hide main shape, if explode on VERTEX
if (shapeType() == TopAbs_VERTEX) { if (shapeType() != TopAbs_VERTEX) {
if (myIsHiddenMain) aDisplayer->Erase(myObject, false, false);
aDisplayer->Display(myObject); myIsHiddenMain = true;
} }
else
aDisplayer->Display(myObject);
aDisplayer->SetDisplayMode(myDmMode); aDisplayer->SetDisplayMode(myDmMode);
if(!isApply) { if(!isApply) {