From b1d938756444c15b5845764e76cbbb92ba9adea2 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 23 Jun 2016 13:21:08 +0300 Subject: [PATCH] Issue #1502 Select sub-solids in viewer : Compsolid shape selection type should be defined in XML directly. --- src/ExchangePlugin/export_widget.xml | 2 +- src/ExchangePlugin/plugin-Exchange.xml | 4 ++-- src/FeaturesPlugin/boolean_widget.xml | 4 ++-- src/FeaturesPlugin/extrusioncut_widget.xml | 3 ++- src/FeaturesPlugin/extrusionfuse_widget.xml | 3 ++- src/FeaturesPlugin/group_widget.xml | 2 +- src/FeaturesPlugin/revolutioncut_widget.xml | 3 ++- src/FeaturesPlugin/revolutionfuse_widget.xml | 3 ++- src/FeaturesPlugin/union_widget.xml | 3 ++- src/ModuleBase/ModuleBase_WidgetSelector.cpp | 3 ++- 10 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/ExchangePlugin/export_widget.xml b/src/ExchangePlugin/export_widget.xml index 60f0454ca..914ef4508 100644 --- a/src/ExchangePlugin/export_widget.xml +++ b/src/ExchangePlugin/export_widget.xml @@ -12,7 +12,7 @@ + type_choice="Vertices Edges Faces Solids Compsolids Objects"> diff --git a/src/ExchangePlugin/plugin-Exchange.xml b/src/ExchangePlugin/plugin-Exchange.xml index eeafa5b95..28f13d951 100755 --- a/src/ExchangePlugin/plugin-Exchange.xml +++ b/src/ExchangePlugin/plugin-Exchange.xml @@ -5,7 +5,7 @@ - + @@ -13,7 +13,7 @@ + type_choice="Vertices Edges Faces Solids Compsolids Objects" use_choice="true"> diff --git a/src/FeaturesPlugin/boolean_widget.xml b/src/FeaturesPlugin/boolean_widget.xml index 7c5e30ad1..83c5cee2b 100644 --- a/src/FeaturesPlugin/boolean_widget.xml +++ b/src/FeaturesPlugin/boolean_widget.xml @@ -15,7 +15,7 @@ label="Main objects" icon="" tooltip="Select solid objects" - type_choice="solids edges faces" + type_choice="solids compsolids edges faces" use_choice="false" concealment="true"> @@ -25,7 +25,7 @@ label="Tool objects" icon="" tooltip="Select a tool solid" - type_choice="solids edges faces" + type_choice="solids compsolids edges faces" use_choice="false" concealment="true" > diff --git a/src/FeaturesPlugin/extrusioncut_widget.xml b/src/FeaturesPlugin/extrusioncut_widget.xml index cdc7fb4b9..14d21f559 100755 --- a/src/FeaturesPlugin/extrusioncut_widget.xml +++ b/src/FeaturesPlugin/extrusioncut_widget.xml @@ -87,7 +87,8 @@ label="Cut from:" icon="icons/Features/cut_shape.png" tooltip="Objects to Cut" - type_choice="Solids" + type_choice="Solids Compsolids" + use_choice="false" concealment="true"> diff --git a/src/FeaturesPlugin/extrusionfuse_widget.xml b/src/FeaturesPlugin/extrusionfuse_widget.xml index 96a843907..778c584f2 100644 --- a/src/FeaturesPlugin/extrusionfuse_widget.xml +++ b/src/FeaturesPlugin/extrusionfuse_widget.xml @@ -87,7 +87,8 @@ label="Fuse with:" icon="icons/Features/cut_shape.png" tooltip="Objects to Fuse" - type_choice="Solids" + type_choice="Solids Compsolids" + use_choice="false" concealment="true"> diff --git a/src/FeaturesPlugin/group_widget.xml b/src/FeaturesPlugin/group_widget.xml index 076b6ba41..6192e9826 100644 --- a/src/FeaturesPlugin/group_widget.xml +++ b/src/FeaturesPlugin/group_widget.xml @@ -3,7 +3,7 @@ diff --git a/src/FeaturesPlugin/revolutioncut_widget.xml b/src/FeaturesPlugin/revolutioncut_widget.xml index 10482c12f..1465db55c 100644 --- a/src/FeaturesPlugin/revolutioncut_widget.xml +++ b/src/FeaturesPlugin/revolutioncut_widget.xml @@ -87,7 +87,8 @@ label="Cut from:" icon="icons/Features/cut_shape.png" tooltip="Objects to Cut" - type_choice="Solids" + type_choice="Solids Compsolids" + use_choice="false" concealment="true"> diff --git a/src/FeaturesPlugin/revolutionfuse_widget.xml b/src/FeaturesPlugin/revolutionfuse_widget.xml index 7e36ba71f..aee797d55 100644 --- a/src/FeaturesPlugin/revolutionfuse_widget.xml +++ b/src/FeaturesPlugin/revolutionfuse_widget.xml @@ -87,7 +87,8 @@ label="Fuse with:" icon="icons/Features/cut_shape.png" tooltip="Objects to Fuse" - type_choice="Solids" + type_choice="Solids Compsolids" + use_choice="false" concealment="true"> diff --git a/src/FeaturesPlugin/union_widget.xml b/src/FeaturesPlugin/union_widget.xml index f8725f877..d0dcdb8b9 100644 --- a/src/FeaturesPlugin/union_widget.xml +++ b/src/FeaturesPlugin/union_widget.xml @@ -4,7 +4,8 @@ diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index a6c82a0dd..bd0dd48d2 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -78,7 +78,8 @@ void ModuleBase_WidgetSelector::updateOnSelectionChanged(const bool theDone) QIntList ModuleBase_WidgetSelector::getShapeTypes() const { QIntList aShapeTypes = shapeTypes(); - if (aShapeTypes.contains(TopAbs_SOLID) || aShapeTypes.contains(ModuleBase_ResultPrs::Sel_Result/*TopAbs_SHAPE*/)) { + if (/*aShapeTypes.contains(TopAbs_SOLID) ||*/ // this type should be mentioned in XML, poor selection otherwise + aShapeTypes.contains(ModuleBase_ResultPrs::Sel_Result/*TopAbs_SHAPE*/)) { // it should be selectable for both, "solids" and "objects" types aShapeTypes.append(TopAbs_COMPSOLID); } -- 2.39.2