From a901ac322222680bb32135077bc68b11c6d847f2 Mon Sep 17 00:00:00 2001 From: mkr Date: Fri, 29 Dec 2006 06:15:18 +0000 Subject: [PATCH] Fix for bug NPAL14172 : EDF 7 SMESH : Option to force renumbering nodes in the preferences menu. --- src/SMESHGUI/SMESHGUI.cxx | 12 ++++++++++++ src/SMESHGUI/SMESH_msg_en.po | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 1163703b5..965cd3759 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -354,6 +354,17 @@ using namespace std; SUIT_OverrideCursor wc; try { + bool Renumber = false ; + // PAL 14172 : Check of we have to renumber or not from the preferences before export + if (resMgr) + Renumber= resMgr->booleanValue("SMESH","renumbering"); + if (Renumber){ + SMESH::SMESH_MeshEditor_var aMeshEditor = aMesh->GetMeshEditor(); + aMeshEditor->RenumberNodes(); + aMeshEditor->RenumberElements(); + if ( SMESHGUI::automaticUpdate() ) + SMESH::UpdateView(); + } switch ( theCommandID ) { case 125: case 122: @@ -3012,6 +3023,7 @@ void SMESHGUI::createPreferences() int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab ); addPreference( tr( "PREF_AUTO_GROUPS" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "auto_groups" ); + int renumber=addPreference( tr( "PREF_RENUMBER" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "renumbering" ); int meshTab = addPreference( tr( "PREF_TAB_MESH" ) ); int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab ); diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index 9d51ef2c4..390013ee1 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"PO-Revision-Date: 2006-01-13 13:50+0300\n" +"PO-Revision-Date: 2006-12-28 12:10+0300\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -3103,6 +3103,9 @@ msgstr "Display mode" msgid "SMESHGUI::PREF_AUTO_GROUPS" msgstr "Automatically create groups for MED export" +msgid "SMESHGUI::PREF_RENUMBER" +msgstr "Automatic renumbering" + #----------------------------------------------------------- msgid "SMESHGUI_MeshDlg::DIM_1D" -- 2.39.2