From 337a0ab4c5f91c3c1bbee7e8114fe5dc6a17cc69 Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 14 Sep 2007 13:49:45 +0000 Subject: [PATCH] Fix for Bug NPAL16771(EDF 556 SMESH : Can't select some groups of nodes in the VTK view). --- resources/SalomeApp.xml | 1 + src/SMESHGUI/SMESHGUI.cxx | 4 +++- src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 5 +++-- src/SMESHGUI/SMESH_msg_en.po | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index 0c4b44de6..fdddc7c58 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -16,6 +16,7 @@ + diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 5b422fc17..291949ad5 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -3077,6 +3077,7 @@ void SMESHGUI::createPreferences() addPreference( tr( "PREF_NODES" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_node" ); addPreference( tr( "PREF_ELEMENTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_element" ); + addPreference( tr( "PREF_OBJECTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_object" ); int sbarTab = addPreference( tr( "SMESH_SCALARBAR" ) ); int fontGr = addPreference( tr( "SMESH_FONT_SCALARBAR" ), sbarTab ); @@ -3167,7 +3168,8 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name ) SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this); if( name=="selection_object_color" || name=="selection_element_color" || name=="selection_width" || name=="highlight_color" || name=="highlight_width" || - name=="selection_precision_node" || name=="selection_precision_element" ) + name=="selection_precision_node" || name=="selection_precision_element" || + name=="selection_precision_object") SMESH::UpdateSelectionProp( this ); else if (name == QString("scalar_bar_vertical_x") || name == QString("scalar_bar_vertical_width")){ sbX1 = aResourceMgr->doubleValue("SMESH", "scalar_bar_vertical_x", sbX1); diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 89bb22f5a..4b8ec47be 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -652,7 +652,8 @@ namespace SMESH { PW = mgr->integerValue( "SMESH", "highlight_width", 5 ); double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ), - SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ); + SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ), + SP3 = mgr->doubleValue( "SMESH", "selection_precision_object", 0.025 ); for ( int i=0, n=views.count(); iSetSelectionTolerance(SP1, SP2); + aVtkView->SetSelectionTolerance(SP1, SP2, SP3); // pre-selection aVtkView->SetPreselectionProp(aPreColor.red()/255., diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index 67fbe6a0b..57cf30939 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -3232,6 +3232,9 @@ msgstr "Nodes" msgid "SMESHGUI::PREF_ELEMENTS" msgstr "Elements" +msgid "SMESHGUI::PREF_OBJECTS" +msgstr "Objects" + msgid "SMESHGUI::PREF_DISPLAY_MODE" msgstr "Display mode" -- 2.30.2