0020971: CEA 422 avoiding display of computed meshes

Improve warning message (to show current mesh size and limit size).
This commit is contained in:
vsr 2010-10-18 10:11:57 +00:00
parent 7aefb1695e
commit 0084139a63
2 changed files with 8 additions and 3 deletions

View 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();

View 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>