- if (aShape->isEqual(aResult->shape())) {
- //aShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
- mySelection.append(GeomSelection(aResult, NULL));//aShape));
- }
- else
- mySelection.append(GeomSelection(aResult, aShape));
+//********************************************************************
+QList<QWidget*> ModuleBase_WidgetMultiSelector::getControls() const
+{
+ QList<QWidget*> result;
+ //result << myTypeCombo;
+ result << myListControl;
+ return result;
+}
+
+//********************************************************************
+void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
+{
+ activateSelectionAndFilters(true);
+ QList<ModuleBase_ViewerPrs> anEmptyList;
+ // This method will call Selection changed event which will call onSelectionChanged
+ // To clear mySelection, myListControl and storeValue()
+ // So, we don't need to call it
+ myWorkshop->setSelected(anEmptyList);
+}
+
+void ModuleBase_WidgetMultiSelector::updateFocus()
+{
+ // Set focus to List control in order to make possible
+ // to use Tab key for transfer the focus to next widgets
+ myListControl->setCurrentRow(myListControl->model()->rowCount() - 1);
+ ModuleBase_Tools::setFocus(myListControl,
+ "ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()");
+}
+
+//********************************************************************
+void ModuleBase_WidgetMultiSelector::updateSelectionName()
+{
+}
+
+//********************************************************************
+QIntList ModuleBase_WidgetMultiSelector::getShapeTypes() const
+{
+ QIntList aShapeTypes;
+
+ if (myTypeCombo->count() > 1 && myIsUseChoice) {
+ aShapeTypes.append(ModuleBase_Tools::shapeType(myTypeCombo->currentText()));
+ }
+ else {
+ for (int i = 0, aCount = myTypeCombo->count(); i < aCount; i++) {
+ TopAbs_ShapeEnum aType = ModuleBase_Tools::shapeType(myTypeCombo->itemText(i));
+ aShapeTypes.append(aType);
+ if (aType == TopAbs_SOLID)
+ aShapeTypes.append(TopAbs_COMPSOLID);