Salome HOME
Typo fixes http://www.salome-platform.org/forum/forum_10/433845793
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index 072b481752a647c102876e2dcfde1d6e226e7315..1dc5e7e12fcdf901ad5eeac9841cd1662beacf87 100644 (file)
@@ -54,6 +54,7 @@
 #include <SUIT_Session.h>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
+#include <SVTK_Renderer.h>
 #include <SalomeApp_Application.h>
 
 // SALOME KERNEL includes
 
 // VTK includes
 #include <vtkProperty.h>
+#include <vtkRenderer.h>
 
 // STL includes
 #include <vector>
 #include <set>
 
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
 #include <sys/sysinfo.h>
 #endif
 
@@ -784,7 +786,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog(QWidget             * parent,
   QLabel * nbElemsName = new QLabel(tr("SMESH_MESHINFO_ELEMENTS"), this );
   nbNodesLabel = new QLabel("0", this );
   nbElemsLabel = new QLabel("0", this );
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
   freeRAMLabel = new QLabel("", this );
 #endif
@@ -800,7 +802,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog(QWidget             * parent,
   layout->addWidget(nbNodesLabel, row++, 1);
   layout->addWidget(nbElemsName,  row,   0);
   layout->addWidget(nbElemsLabel, row++, 1);
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   layout->addWidget(freeRAMName,  row,   0);
   layout->addWidget(freeRAMLabel, row++, 1);
 #endif
@@ -840,7 +842,7 @@ void SMESHGUI_ComputeDlg_QThreadQDialog::timerEvent(QTimerEvent *event)
   {
     nbNodesLabel->setText( QString("%1").arg( qthread.getMesh()->NbNodes() ));
     nbElemsLabel->setText( QString("%1").arg( qthread.getMesh()->NbElements() ));
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
     struct sysinfo si;
     const int err = sysinfo( &si );
     if ( err )
@@ -1009,6 +1011,10 @@ void SMESHGUI_BaseComputeOp::computeMesh()
                 ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
               SMESH::Update(anIO, toDisplay);
 
+              if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
+                if ( vtkWnd->getRenderer() )
+                  vtkWnd->getRenderer()->ResetCameraClippingRange();
+
               if ( limitExceeded && !aMesh->_is_nil() )
               {
                 QStringList hiddenMsg;
@@ -1226,7 +1232,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
       currentCellChanged(); // to update buttons
     }
   }
-  // show dialog and wait, becase Compute can be invoked from Preview operation
+  // show dialog and wait, because Compute can be invoked from Preview operation
   //aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
   aCompDlg->show();
 }
@@ -1766,7 +1772,7 @@ void SMESHGUI_PrecomputeOp::initDialog()
 
 //================================================================================
 /*!
- * \brief detect asigned mesh algorithms
+ * \brief detect assigned mesh algorithms
  */
 //================================================================================
 
@@ -2391,7 +2397,7 @@ void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
       currentCellChanged(); // to update buttons
     }
   }
-  // show dialog and wait, becase Compute can be invoked from Preview operation
+  // show dialog and wait, because Compute can be invoked from Preview operation
   //aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
   aCompDlg->show();
 }