]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
PartSet_Module::createWidgetByType() use if/else sequence instead of separate if/if
authorSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Mon, 18 May 2015 12:46:50 +0000 (15:46 +0300)
committerSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Tue, 19 May 2015 07:58:20 +0000 (10:58 +0300)
src/PartSet/PartSet_Module.cpp

index 4f4dd7fa1e32f3391b9f9a363fe4b5e7fdd7a4e7..e94be9298c944b36d7da6b72b9acda9a8557f402 100644 (file)
@@ -472,29 +472,27 @@ ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& th
     aPointWgt->setSketch(mySketchMgr->activeSketch());
     connect(aPointWgt, SIGNAL(vertexSelected()), this, SLOT(onVertexSelected()));
     aWgt = aPointWgt;
-  } if (theType == "point2ddistance") {
+  } else if (theType == "point2ddistance") {
     PartSet_WidgetPoint2dDistance* aDistanceWgt = new PartSet_WidgetPoint2dDistance(theParent, theWidgetApi, theParentId);
     aDistanceWgt->setWorkshop(aWorkshop);
     aDistanceWgt->setSketch(mySketchMgr->activeSketch());
     aWgt = aDistanceWgt;
-  } if(theType == "point2dangle") {
+  } else if(theType == "point2dangle") {
     PartSet_WidgetPoint2dAngle* anAngleWgt = new PartSet_WidgetPoint2dAngle(theParent, theWidgetApi, theParentId);
     anAngleWgt->setWorkshop(aWorkshop);
     anAngleWgt->setSketch(mySketchMgr->activeSketch());
     aWgt = anAngleWgt;
-  }
-  if (theType == "sketch_shape_selector") {
+  } else if (theType == "sketch_shape_selector") {
     PartSet_WidgetShapeSelector* aShapeSelectorWgt =
       new PartSet_WidgetShapeSelector(theParent, workshop(), theWidgetApi, theParentId);
     aShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
     aWgt = aShapeSelectorWgt;
-  } if (theType == "sketch_multi_selector") {
+  } else if (theType == "sketch_multi_selector") {
     PartSet_WidgetMultiSelector* aShapeSelectorWgt =
       new PartSet_WidgetMultiSelector(theParent, workshop(), theWidgetApi, theParentId);
     aShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
     aWgt = aShapeSelectorWgt;
-  }
-  if (theType == WDG_DOUBLEVALUE_EDITOR) {
+  } else if (theType == WDG_DOUBLEVALUE_EDITOR) {
     aWgt = new PartSet_WidgetEditor(theParent, workshop(), theWidgetApi, theParentId);
   } else if (theType == "export_file_selector") {
     aWgt = new PartSet_WidgetFileSelector(theParent, workshop(), theWidgetApi, theParentId);