Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Use the correct boundingRect for ellipse shape.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23436 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Nov 18, 2014
1 parent 13e8a6f commit 7c1c4f2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions OMEdit/OMEditGUI/Annotations/EllipseAnnotation.cpp
Expand Up @@ -144,14 +144,11 @@ void EllipseAnnotation::drawEllipseAnnotaion(QPainter *painter)
applyFillPattern(painter);
qreal startAngle = StringHandler::getNormalizedAngle(mStartAngle);
qreal endAngle = StringHandler::getNormalizedAngle(mEndAngle);
if ((startAngle - endAngle) == 0)
{
path.addEllipse(boundingRect());
if ((startAngle - endAngle) == 0) {
path.addEllipse(getBoundingRect());
painter->drawPath(path);
}
else
{
painter->drawPie(boundingRect(), mStartAngle*16, mEndAngle*16 - mStartAngle*16);
} else {
painter->drawPie(getBoundingRect(), mStartAngle*16, mEndAngle*16 - mStartAngle*16);
}
}

Expand Down

0 comments on commit 7c1c4f2

Please sign in to comment.