]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Optimized access to boolean value
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 10 Oct 2014 11:17:21 +0000 (15:17 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 10 Oct 2014 11:17:21 +0000 (15:17 +0400)
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp

index 0b433e663447f23a3311ecccd08f27d019fd88eb..f07c339caa60e82bd6a68645d904559758b1d4d3 100644 (file)
@@ -108,11 +108,7 @@ ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParen
   std::string aTypes = theData->getProperty("shape_types");
   myShapeTypes = QString(aTypes.c_str()).split(' ');
 
-  std::string aUseSubShapes = theData->getProperty("use_subshapes");
-  if (aUseSubShapes.length() > 0) {
-    QString aVal(aUseSubShapes.c_str());
-    myUseSubShapes = (aVal.toUpper() == "TRUE");
-  }
+  myUseSubShapes = theData->getBooleanAttribute("use_subshapes", false); 
 }
 
 //********************************************************************