From: jfa Date: Mon, 26 Nov 2007 13:22:55 +0000 (+0000) Subject: Fix bug 17655: 'Show' and 'Display only' don't work on Mesh root object. X-Git-Tag: V3_2_9rc2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=0272d8a2f583680b8c9c2a49020d91dd68cab379;hp=2499c37bf155cda2dfcc760b7f112e0414168cfe Fix bug 17655: 'Show' and 'Display only' don't work on Mesh root object. --- diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 707e2238a..7475610a7 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -675,15 +675,20 @@ namespace SMESH { switch(theAction){ case eDisplay: case eDisplayOnly:{ - SalomeApp_Study* aStudy = dynamic_cast( theWnd->getViewManager()->study() ); + SalomeApp_Study* aStudy = dynamic_cast(theWnd->getViewManager()->study()); _PTR(Study) aDocument = aStudy->studyDS(); - if((anActor = CreateActor(aDocument,theEntry,true))) { - bool needFitAll = noSmeshActors(theWnd); // fit for the first object only - DisplayActor(theWnd,anActor); - // FitAll(); - PAL16770(Display of a group performs an automatic fit all) - if ( needFitAll ) FitAll(); - } else { - OK = false; + // Pass non-visual objects (hypotheses, etc.), return true in this case + CORBA::Long anId = aDocument->StudyId(); + if (TVisualObjPtr aVisualObj = GetVisualObj(anId,theEntry)) + { + if ((anActor = CreateActor(aDocument,theEntry,true))) { + bool needFitAll = noSmeshActors(theWnd); // fit for the first object only + DisplayActor(theWnd,anActor); + // FitAll(); - PAL16770(Display of a group performs an automatic fit all) + if ( needFitAll ) FitAll(); + } else { + OK = false; + } } break; }