@@ -167,14 +167,13 @@ void EllipseAnnotation::paint(QPainter *painter, const QStyleOptionGraphicsItem
167167 */
168168void EllipseAnnotation::drawAnnotation (QPainter *painter, bool scene)
169169{
170- // first we invert the painter since we have our coordinate system inverted.
171- // inversion is required to draw the elliptic curves at correct angles.
172- painter->scale (1.0 , -1.0 );
173170 QRectF boundingRectangle = boundingRect ();
174- if (scene) {
175- boundingRectangle = mapToScene (boundingRect ()).boundingRect ();
171+ if (!scene) {
172+ // first we invert the painter since we have our coordinate system inverted.
173+ // inversion is required to draw the elliptic curves at correct angles.
174+ painter->scale (1.0 , -1.0 );
175+ painter->translate (0 , ((-boundingRectangle.top ()) - boundingRectangle.bottom ()));
176176 }
177- painter->translate (0 , ((-boundingRectangle.top ()) - boundingRectangle.bottom ()));
178177 applyLinePattern (painter);
179178 if (mClosure != StringHandler::ClosureNone) {
180179 applyFillPattern (painter);
@@ -249,7 +248,7 @@ QString EllipseAnnotation::getShapeAnnotation()
249248 // get the closure
250249 if (mClosure .isDynamicSelectExpression () || !((mStartAngle == 0 && mEndAngle == 360 && mClosure .toQString ().compare (QStringLiteral (" EllipseClosure.Chord" )) == 0 )
251250 || (!(mStartAngle == 0 && mEndAngle == 360 ) && mClosure .toQString ().compare (QStringLiteral (" EllipseClosure.Radial" )) == 0 ))) {
252- annotationString.append (QString (" closure=%1" ).append (mClosure .toQString ()));
251+ annotationString.append (QString (" closure=%1" ).arg (mClosure .toQString ()));
253252 }
254253 return QString (" Ellipse(" ).append (annotationString.join (" ," )).append (" )" );
255254}
0 commit comments