Refactoring. Merge similar switch cases together.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-12-21 19:07:57 +02:00
parent 6fe96ca4d0
commit d247823d22

View File

@ -153,10 +153,9 @@ void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item)
ShowOptionsToolTriangle(item); ShowOptionsToolTriangle(item);
break; break;
case VGraphicsSimpleTextItem::Type: case VGraphicsSimpleTextItem::Type:
currentItem = item->parentItem();
ShowItemOptions(currentItem);
break;
case VControlPointSpline::Type: case VControlPointSpline::Type:
case VSimplePoint::Type:
case VSimpleCurve::Type:
currentItem = item->parentItem(); currentItem = item->parentItem();
ShowItemOptions(currentItem); ShowItemOptions(currentItem);
break; break;
@ -172,14 +171,6 @@ void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item)
case VToolPointFromArcAndTangent::Type: case VToolPointFromArcAndTangent::Type:
ShowOptionsToolPointFromArcAndTangent(item); ShowOptionsToolPointFromArcAndTangent(item);
break; break;
case VSimplePoint::Type:
currentItem = item->parentItem();
ShowItemOptions(currentItem);
break;
case VSimpleCurve::Type:
currentItem = item->parentItem();
ShowItemOptions(currentItem);
break;
case VToolTrueDarts::Type: case VToolTrueDarts::Type:
ShowOptionsToolTrueDarts(item); ShowOptionsToolTrueDarts(item);
break; break;
@ -289,8 +280,6 @@ void VToolOptionsPropertyBrowser::UpdateOptions()
UpdateOptionsToolTriangle(); UpdateOptionsToolTriangle();
break; break;
case VGraphicsSimpleTextItem::Type: case VGraphicsSimpleTextItem::Type:
ShowItemOptions(currentItem->parentItem());
break;
case VControlPointSpline::Type: case VControlPointSpline::Type:
ShowItemOptions(currentItem->parentItem()); ShowItemOptions(currentItem->parentItem());
break; break;