From: vsv Date: Wed, 4 May 2016 12:14:01 +0000 (+0300) Subject: Issue #1412: Define selection preferences in SALOME mode. X-Git-Tag: V_2.3.0~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6dde65bf4362a03635d22ad8421f53b9f27c2b4;p=modules%2Fshaper.git Issue #1412: Define selection preferences in SALOME mode. --- diff --git a/src/ModuleBase/ModuleBase_Preferences.cpp b/src/ModuleBase/ModuleBase_Preferences.cpp index 7558aeecf..d63554647 100644 --- a/src/ModuleBase/ModuleBase_Preferences.cpp +++ b/src/ModuleBase/ModuleBase_Preferences.cpp @@ -292,6 +292,7 @@ void ModuleBase_PreferencesDlg::createViewerPage(int thePageId) // Create other parameters group in viewer tab int otherGroup = myPreferences->addItem(tr("Default selection"), viewTab); + myPreferences->setItemProperty("columns", 3, otherGroup); myPreferences->addItem(tr("Faces"), otherGroup, SUIT_PreferenceMgr::Bool, ModuleBase_Preferences::VIEWER_SECTION, "face-selection"); @@ -301,20 +302,6 @@ void ModuleBase_PreferencesDlg::createViewerPage(int thePageId) myPreferences->addItem(tr("Vertices"), otherGroup, SUIT_PreferenceMgr::Bool, ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection"); - //QStringList aSelectionList; - //aSelectionList.append( tr("Vertices") ); - //aSelectionList.append( tr("Edges") ); - //aSelectionList.append( tr("Faces") ); - //aSelectionList.append( tr("Results") ); - - //QList anIndexesList; - //anIndexesList.append(TopAbs_VERTEX); - //anIndexesList.append(TopAbs_EDGE); - //anIndexesList.append(TopAbs_FACE); - //anIndexesList.append(-1); - - //myPreferences->setItemProperty( "strings", aSelectionList, selId ); - //myPreferences->setItemProperty( "indexes", anIndexesList, selId ); } void ModuleBase_PreferencesDlg::createMenuPage(int thePageId) diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index cb1deb392..ad4b87c42 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -581,24 +581,17 @@ void SHAPERGUI::createPreferences() int viewTab = pref->addItem(tr("Viewer"), catId); // Create other parameters group in viewer tab - int otherGroup = pref->addItem(tr("Other parameters"), viewTab); - int selId = pref->addItem(tr("Default selection type"), otherGroup, - SUIT_PreferenceMgr::Selector, - ModuleBase_Preferences::VIEWER_SECTION, "selection"); - QStringList aSelectionList; - aSelectionList.append( tr("Vertices") ); - aSelectionList.append( tr("Edges") ); - aSelectionList.append( tr("Faces") ); - aSelectionList.append( tr("Results") ); - - QList anIndexesList; - anIndexesList.append(TopAbs_VERTEX); - anIndexesList.append(TopAbs_EDGE); - anIndexesList.append(TopAbs_FACE); - anIndexesList.append(-1); - - pref->setItemProperty( "strings", aSelectionList, selId ); - pref->setItemProperty( "indexes", anIndexesList, selId ); + int otherGroup = pref->addItem(tr("Default selection"), viewTab); + pref->setItemProperty("columns", 3, otherGroup); + pref->addItem(tr("Faces"), otherGroup, + SUIT_PreferenceMgr::Bool, + ModuleBase_Preferences::VIEWER_SECTION, "face-selection"); + pref->addItem(tr("Edges"), otherGroup, + SUIT_PreferenceMgr::Bool, + ModuleBase_Preferences::VIEWER_SECTION, "edge-selection"); + pref->addItem(tr("Vertices"), otherGroup, + SUIT_PreferenceMgr::Bool, + ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection"); pref->retrieve(); } diff --git a/src/SHAPERGUI/resources/LightApp.xml.in b/src/SHAPERGUI/resources/LightApp.xml.in index e3ae4cd56..670a053b0 100644 --- a/src/SHAPERGUI/resources/LightApp.xml.in +++ b/src/SHAPERGUI/resources/LightApp.xml.in @@ -37,6 +37,8 @@
- + + +
diff --git a/src/SHAPERGUI/resources/SalomeApp.xml.in b/src/SHAPERGUI/resources/SalomeApp.xml.in index 4b0a00121..b0a6c5522 100644 --- a/src/SHAPERGUI/resources/SalomeApp.xml.in +++ b/src/SHAPERGUI/resources/SalomeApp.xml.in @@ -42,6 +42,8 @@
- + + +