From 0084139a63c5ce0d395557a6a5295c84eda7dee6 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 18 Oct 2010 10:11:57 +0000 Subject: [PATCH] 0020971: CEA 422 avoiding display of computed meshes Improve warning message (to show current mesh size and limit size). --- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 6 +++++- src/SMESHGUI/SMESH_msg_en.ts | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 01891fc81..b31a1b8e9 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -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( 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(); diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 5b650cf9d..09654364f 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -2062,8 +2062,9 @@ Consider saving your work before application crash SMESH_WRN_SIZE_LIMIT_EXCEEDED - Mesh size limit has been exceeded. -No automatic update of the presentation has been done. + 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. + SMESH_WRN_WARNING