Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 276672fc authored by Inge Wallin's avatar Inge Wallin

Fix a bug which made the marker go outside the disk.

parent d72fa897
......@@ -246,14 +246,13 @@ void DiskGraphicsItem::viewScaleChanged()
double s = currentViewScale();
double radius = disk()->radius();
if(radius > 1/s) {
if (radius > 1/s) {
_painterPath.addEllipse(-radius, -radius, 2*radius, 2*radius);
_markPath.moveTo(-radius, radius);
_markPath.lineTo(radius, -radius);
_markPath.moveTo(radius, -radius);
_markPath.lineTo(-radius, radius);
_markPath.moveTo(0, 0);
_markPath.lineTo(radius, 0);
} else {
_painterPath.addEllipse(-1/s, -1/s, 2/s, 2/s);
// Don't need a marker when the disk is too small to see in detail.
}
_markPath = QMatrix().rotate(disk()->angle() * 180 / StepCore::Constants::Pi).map(_markPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment