AttributeSelectionListPtr aSelectionListAttr =
boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
- if (aSelectionListAttr && (mySelection.size() > 0)) {
+ if (aSelectionListAttr) {
aSelectionListAttr->clear();
// Store shapes type
TopAbs_ShapeEnum aCurrentType =
mySelection.append(GeomSelection(aResult, aShape));
}
updateSelectionList();
- storeValue();
emit valuesChanged();
}
myIsActive = toActivate;
if (myIsActive) {
connect(myWorkshop, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
- onSelectionTypeChanged();
+ //onSelectionTypeChanged();
} else {
disconnect(myWorkshop, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
myWorkshop->deactivateSubShapesSelection();
}
}
-//********************************************************************
-void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
+void ModuleBase_WidgetMultiSelector::activateShapeSelection()
{
- myListControl->clear();
QString aNewType = myTypeCombo->currentText();
QIntList aList;
aList.append(ModuleBase_WidgetShapeSelector::shapeType(aNewType));
myWorkshop->activateSubShapesSelection(aList);
}
+
+//********************************************************************
+void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
+{
+ QList<ObjectPtr> anEmptyList;
+ myWorkshop->setSelected(anEmptyList);
+ activateShapeSelection();
+ onSelectionChanged();
+}
void filterShapes(const NCollection_List<TopoDS_Shape>& theShapesToFilter,
NCollection_List<TopoDS_Shape>& theResult);
void setCurrentShapeType(const TopAbs_ShapeEnum theShapeType);
+ void activateShapeSelection();
private:
void updateSelectionList();