<parameter name="auto_update" value="true" />
<parameter name="display_mode" value="1" />
<parameter name="auto_groups" value="false"/>
+ <parameter name="show_result_notification" value="2"/>
</section>
<section name="resources">
<!-- Module resources -->
addPreference( tr( "PREF_AUTO_GROUPS" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "auto_groups" );
addPreference( tr( "PREF_RENUMBER" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "renumbering" );
+ int computeGroup = addPreference( tr( "PREF_GROUP_COMPUTE" ), genTab );
+ setPreferenceProperty( computeGroup, "columns", 2 );
+ int notifyMode = addPreference( tr( "PREF_NOTIFY_MODE" ), computeGroup, LightApp_Preferences::Selector, "SMESH", "show_result_notification" );
+ modes.clear();
+ modes.append( "Never" );
+ modes.append( "Errors only" );
+ modes.append( "Always" );
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ indices.append( 2 );
+ setPreferenceProperty( notifyMode, "strings", modes );
+ setPreferenceProperty( notifyMode, "indexes", indices );
+
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
setPreferenceProperty( nodeGroup, "columns", 2 );
currentCellChanged(); // to update buttons
}
}
- myDlg->show();
+ SUIT_ResourceMgr* resMgr = SMESH::GetResourceMgr( SMESHGUI::GetSMESHGUI() );
+ int aNotifyMode = resMgr->integerValue( "SMESH", "show_result_notification" );
+
+ switch( aNotifyMode ) {
+ case 0: // show the mesh computation result dialog NEVER
+ commit();
+ break;
+ case 1: // show the mesh computation result dialog if there are some errors
+ if ( memoryLack || !noCompError || !noHypoError )
+ myDlg->show();
+ else
+ commit();
+ break;
+ default: // show the result dialog after each mesh computation
+ myDlg->show();
+ }
+
}
//================================================================================
<source>PREF_FILL</source>
<translation>Fill</translation>
</message>
+ <message>
+ <source>PREF_NOTIFY_MODE</source>
+ <translation>Show a computation result notification</translation>
+ </message>
<message>
<source>PREF_GROUP_ELEMENTS</source>
<translation>Elements</translation>
<source>PREF_GROUP_EXPORT</source>
<translation>Mesh export</translation>
</message>
+ <message>
+ <source>PREF_GROUP_COMPUTE</source>
+ <translation>Mesh computation</translation>
+ </message>
<message>
<source>PREF_GROUP_NODES</source>
<translation>Nodes</translation>