From: Artem Zhidkov Date: Mon, 26 Oct 2020 11:28:30 +0000 (+0300) Subject: Issue #20245: New error when loading python dump: attribute "ExternalFeature" is... X-Git-Tag: V9_6_0rc1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffixes_for_960;p=modules%2Fshaper.git Issue #20245: New error when loading python dump: attribute "ExternalFeature" is invalid Improve multi-selection widget to process selection type by the shape type instead of string value defined in XML. --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index bb5c6e39d..9ed25e82e 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -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);