]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix bug 17655: 'Show' and 'Display only' don't work on Mesh root object.
authorjfa <jfa@opencascade.com>
Mon, 26 Nov 2007 13:22:55 +0000 (13:22 +0000)
committerjfa <jfa@opencascade.com>
Mon, 26 Nov 2007 13:22:55 +0000 (13:22 +0000)
src/SMESHGUI/SMESHGUI_VTKUtils.cxx

index 707e2238ae4c48f66d57954ef51598c2115cb82b..7475610a75489de2a15321d43ba69a4fe98a9394 100644 (file)
@@ -675,15 +675,20 @@ namespace SMESH {
          switch(theAction){
          case eDisplay:
          case eDisplayOnly:{
-           SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( theWnd->getViewManager()->study() );
+           SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(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;
          }