Salome HOME
Typo-fix by Kunda
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_VTKUtils.cxx
index 390335532c7c769fd461a4a76e6fef0ec43147ec..10bc6ba22351523fb3777999d8747c0da72b8bd6 100644 (file)
@@ -349,7 +349,7 @@ namespace SMESH
       try {
         OCC_CATCH_SIGNALS;
         if (nulData)
-                objModified = aVisualObj->NulData();
+          objModified = aVisualObj->NulData();
         else
           objModified = aVisualObj->Update();
       }
@@ -362,7 +362,7 @@ namespace SMESH
     }
 
     if ( objModified ) {
-      // PAL16631. Mesurements showed that to show aVisualObj in SHADING(default) mode,
+      // PAL16631. Measurements showed that to show aVisualObj in SHADING(default) mode,
       // ~5 times more memory is used than it occupies.
       // Warn the user if there is less free memory than 30 sizes of a grid
       // TODO: estimate memory usage in other modes and take current mode into account
@@ -370,24 +370,24 @@ namespace SMESH
       int usedMB = aVisualObj->GetUnstructuredGrid()->GetActualMemorySize() / 1024;
       //MESSAGE("SMESHGUI_VTKUtils::GetVisualObj(), freeMB=" << freeMB << ", usedMB=" <<usedMB);
       if ( freeMB > 0 && usedMB * 5 > freeMB ) {
-       bool continu = false;
-       if ( usedMB * 3 > freeMB )
-         // even dont try to show
-         SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
-                                  QObject::tr("SMESH_NO_MESH_VISUALIZATION"));
-       else
-         // there is a chance to succeed
-         continu = SUIT_MessageBox::warning
-           (SMESHGUI::desktop(),
-            QObject::tr("SMESH_WRN_WARNING"),
-            QObject::tr("SMESH_CONTINUE_MESH_VISUALIZATION"),
-            SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-            SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes;
-       if ( !continu ) {
-         // remove the corresponding actors from all views
-         RemoveVisualObjectWithActors( theEntry );
-         aVisualObj.reset();
-       }
+        bool continu = false;
+        if ( usedMB * 3 > freeMB )
+          // don't even try to show
+          SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
+                                   QObject::tr("SMESH_NO_MESH_VISUALIZATION"));
+        else
+          // there is a chance to succeed
+          continu = SUIT_MessageBox::warning
+            (SMESHGUI::desktop(),
+             QObject::tr("SMESH_WRN_WARNING"),
+             QObject::tr("SMESH_CONTINUE_MESH_VISUALIZATION"),
+             SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+             SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes;
+        if ( !continu ) {
+          // remove the corresponding actors from all views
+          RemoveVisualObjectWithActors( theEntry );
+          aVisualObj.reset();
+        }
       }
     }
 
@@ -396,7 +396,7 @@ namespace SMESH
 
 
   /*! Return active view window, if it instantiates SVTK_ViewWindow class,
-   *  overwise find or create corresponding view window, make it active and return it.
+   *  otherwise find or create corresponding view window, make it active and return it.
    *  \note Active VVTK_ViewWindow can be returned, because it inherits SVTK_ViewWindow.
    */
   SVTK_ViewWindow* GetViewWindow (const SalomeApp_Module* theModule,
@@ -762,6 +762,7 @@ namespace SMESH
                 if ((anActor = CreateActor(aDocument,theEntry,true))) {
                   bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
                   DisplayActor(theWnd,anActor);
+                  anActor->SetVisibility(true);
                   aStudy->setVisibilityState(theEntry, Qtx::ShownState);
                   // FitAll(); - PAL16770(Display of a group performs an automatic fit all)
                   if (needFitAll) FitAll();