From 0272d8a2f583680b8c9c2a49020d91dd68cab379 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 26 Nov 2007 13:22:55 +0000 Subject: [PATCH] Fix bug 17655: 'Show' and 'Display only' don't work on Mesh root object. --- src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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; } -- 2.39.2