1. Planar face of non-sketch object or a plane. Sketch creation will be started.<br />
2. An existing sketch face or contour. Extrusion will be filled by it.<br />
3. An existing result shape of kind: wires/edge/vertices. Extrusion will be filled by it."
- shape_types="Vertices Edges Faces"
+ shape_types="Vertices Edges Faces|Wires"
type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
default_type = "2"
use_choice="true">
<multi_selector id="base"
label="Base objects:"
tooltip="Select a base objects"
- shape_types="Vertices Edges Faces"
+ shape_types="Vertices Edges Faces|Wires"
type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
default_type = "2"
use_choice="true"
1. Planar face of non-sketch object or a plane. Sketch creation will be started.<br />
2. An existing sketch face or contour. Extrusion will be filled by it.<br />
3. An existing result shape of kind: wires/edge/vertices. Extrusion will be filled by it."
- shape_types="Vertices Edges Faces"
+ shape_types="Vertices Edges Faces|Wires"
type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
default_type = "2"
use_choice="true">
label="Select a sketch face"
icon="icons/Features/sketch.png"
tooltip="Select a sketch face"
- shape_types="Vertices Edges Faces"
+ shape_types="Vertices Edges Faces|Wire"
type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
default_type = "2"
use_choice="true"
if (aSelectionType.empty())
aSelectionListAttr->setSelectionType(myDefMode);
else {
- setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionType.c_str()));
+ setCurrentShapeType(aSelectionType.c_str());
myDefMode = aSelectionType;
myIsFirst = false;
}
QIntList aShapeTypes;
if (myShapeTypes.length() > 1 && myIsUseChoice) {
- aShapeTypes.append(ModuleBase_Tools::shapeType(myTypeCtrl->textValue()));
+ QStringList aTypes = myTypeCtrl->textValue().split("|", QString::SkipEmptyParts);
+ for(QString aType: aTypes) {
+ aShapeTypes.append(ModuleBase_Tools::shapeType(aType));
+ }
}
else {
foreach (QString aType, myShapeTypes) {
- aShapeTypes.append(ModuleBase_Tools::shapeType(aType));
+ QStringList aSubTypes = aType.split("|", QString::SkipEmptyParts);
+ for(QString aSubType: aSubTypes) {
+ aShapeTypes.append(ModuleBase_Tools::shapeType(aSubType));
+ }
}
}
return aShapeTypes;
}
//********************************************************************
-void ModuleBase_WidgetMultiSelector::setCurrentShapeType(const int theShapeType)
+void ModuleBase_WidgetMultiSelector::setCurrentShapeType(const QString& theShapeType)
{
int idx = 0;
foreach (QString aShapeTypeName, myShapeTypes) {
- int aRefType = ModuleBase_Tools::shapeType(aShapeTypeName);
- if(aRefType == theShapeType && idx != myTypeCtrl->value()) {
+ if(aShapeTypeName == theShapeType && idx != myTypeCtrl->value()) {
updateSelectionModesAndFilters(false);
bool isBlocked = myTypeCtrl->blockSignals(true);
myTypeCtrl->setValue(idx);
virtual QIntList shapeTypes() const;
/// Set current shape type for selection
- void setCurrentShapeType(const int theShapeType);
+ void setCurrentShapeType(const QString& theShapeType);
/// Return the attribute values wrapped in a list of viewer presentations
/// \return a list of viewer presentations, which contains an attribute result and
{
QIntList aShapeTypes;
if (myShapeTypes.length() > 1 && myIsUseChoice) {
- aShapeTypes.append(ModuleBase_Tools::shapeType(myTypeCtrl->textValue()));
+ QStringList aTypes = myTypeCtrl->textValue().split("|", QString::SkipEmptyParts);
+ foreach(QString aType, aTypes) {
+ aShapeTypes.append(ModuleBase_Tools::shapeType(aType));
+ }
}
else {
foreach(QString aType, myShapeTypes) {
- aShapeTypes.append(ModuleBase_Tools::shapeType(aType));
+ QStringList aSubTypes = aType.split("|", QString::SkipEmptyParts);
+ foreach(QString asubType, aSubTypes) {
+ aShapeTypes.append(ModuleBase_Tools::shapeType(asubType));
+ }
}
}
return aShapeTypes;