]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #20245: New error when loading python dump: attribute "ExternalFeature" is... fixes_for_960
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Mon, 26 Oct 2020 11:28:30 +0000 (14:28 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Mon, 26 Oct 2020 11:28:30 +0000 (14:28 +0300)
Improve multi-selection widget to process selection type by the shape type instead of string value defined in XML.

src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp

index bb5c6e39d12f0685a8eb7ceb21111894a2adc773..9ed25e82e4c490df9a9ff274b7ee356afc20f342 100644 (file)
@@ -772,8 +772,10 @@ QIntList ModuleBase_WidgetMultiSelector::shapeTypes() const
 void ModuleBase_WidgetMultiSelector::setCurrentShapeType(const QString& theShapeType)
 {
   int idx = 0;
+  GeomAPI_Shape::ShapeType aShapeType = GeomAPI_Shape::shapeTypeByStr(theShapeType.toStdString());
   foreach (QString aShapeTypeName, myShapeTypes) {
-    if(aShapeTypeName == theShapeType && idx != myTypeCtrl->value()) {
+    if(GeomAPI_Shape::shapeTypeByStr(aShapeTypeName.toStdString()) == aShapeType &&
+       idx != myTypeCtrl->value()) {
       updateSelectionModesAndFilters(false);
       bool isBlocked = myTypeCtrl->blockSignals(true);
       myTypeCtrl->setValue(idx);