Salome HOME
0020971: CEA 422 avoiding display of computed meshes
authorvsr <vsr@opencascade.com>
Mon, 18 Oct 2010 10:11:57 +0000 (10:11 +0000)
committervsr <vsr@opencascade.com>
Mon, 18 Oct 2010 10:11:57 +0000 (10:11 +0000)
Improve warning message (to show current mesh size and limit size).

src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESH_msg_en.ts

index 01891fc8137735dab51b99c167baa5a1fbb68d26..b31a1b8e9685f65a227f377bb0664455697bc335 100644 (file)
@@ -98,6 +98,7 @@
 
 #define COLONIZE(str)   (QString(str).contains(":") > 0 ? QString(str) : QString(str) + " :" )
 
+/* OBSOLETE
 static void addSeparator( QWidget* parent )
 {
   QGridLayout* l = qobject_cast<QGridLayout*>( parent->layout() );
@@ -109,6 +110,7 @@ static void addSeparator( QWidget* parent )
     l->addWidget( hline, row, i );
   }
 }
+*/
 
 enum TCol {
   COL_ALGO = 0, COL_SHAPE, COL_ERROR, COL_SHAPEID, COL_PUBLISHED, COL_BAD_MESH, NB_COLUMNS
@@ -734,7 +736,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
 
       // SHOW MESH
       // NPAL16631: if ( getSMESHGUI()->automaticUpdate() )
+      SUIT_ResourceMgr* resMgr = SMESH::GetResourceMgr( SMESHGUI::GetSMESHGUI() );
       long newSize = myMesh->NbElements();
+      long limitSize = resMgr->integerValue( "SMESH", "update_limit", 500000 );
       bool limitExceeded;
       if ( !memoryLack )
       {
@@ -762,7 +766,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
        {
          SUIT_MessageBox::warning( desktop(),
                                    tr( "SMESH_WRN_WARNING" ),
-                                   tr( "SMESH_WRN_SIZE_LIMIT_EXCEEDED" ) );
+                                   tr( "SMESH_WRN_SIZE_LIMIT_EXCEEDED" ).arg( newSize ).arg( limitSize ) );
        }
       }
       LightApp_SelectionMgr *Sel = selectionMgr();
index 5b650cf9d219e121995e537620e5b3c66db0fea4..09654364fea7cc6a93b119ca7bdc5a851cc5bfb8 100644 (file)
@@ -2062,8 +2062,9 @@ Consider saving your work before application crash</translation>
     </message>
     <message>
         <source>SMESH_WRN_SIZE_LIMIT_EXCEEDED</source>
-        <translation>Mesh size limit has been exceeded.
-No automatic update of the presentation has been done.</translation>
+        <translation>No automatic update of the presentation has been done: new mesh size (%1 elements) exceeds current size limit (%2 elements).
+Please check preferences of Mesh module.
+</translation>
     </message>
     <message>
         <source>SMESH_WRN_WARNING</source>