From: akl Date: Thu, 31 Jul 2008 06:45:54 +0000 (+0000) Subject: To implement issue 0016172: EDF 452 SMESH : Define in the preferences if we want... X-Git-Tag: V5_1_0a1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aadd73166e9fb1111ae145d6ddca6c0b06640c74;p=modules%2Fsmesh.git To implement issue 0016172: EDF 452 SMESH : Define in the preferences if we want or not the Mesh info Box (at end of computation). --- diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index ff008e6d8..8f4b7b0e8 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -39,6 +39,7 @@ +
diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 16c564fb8..9c5dab2b6 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -3311,6 +3311,20 @@ void SMESHGUI::createPreferences() 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 ); diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 539024934..d62255d86 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -1157,7 +1157,23 @@ void SMESHGUI_ComputeOp::startOperation() 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(); + } + } //================================================================================ diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 6c8904091..bef24fd98 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -2816,6 +2816,10 @@ Please, create VTK viewer and try again PREF_FILL Fill + + PREF_NOTIFY_MODE + Show a computation result notification + PREF_GROUP_ELEMENTS Elements @@ -2824,6 +2828,10 @@ Please, create VTK viewer and try again PREF_GROUP_EXPORT Mesh export + + PREF_GROUP_COMPUTE + Mesh computation + PREF_GROUP_NODES Nodes