Skip to content

Commit

Permalink
Fix step size calculation for shape tools
Browse files Browse the repository at this point in the history
It wouldn't actually make small steps for MyPaint brushes, instead it
would just do a single stride and then stay at the same position all the
time. Now it properly does small steps, making MyPaint shapes work.

Relates to #1151.
  • Loading branch information
askmeaboutlo0m committed Nov 17, 2023
1 parent 1d4c338 commit 71443d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Unreleased Version 2.2.0-pre
* Fix: Prefer versioned lconvert executable over unversioned one to make things work on Fedora. Thanks lowontrash for reporting.
* Fix: Look in source directory for assets when building, making running from the build directory possible. Can be turned off with -DSOURCE_ASSETS=OFF. Thanks Meru, lowontrash and probably others for running into issues with this.
* Fix: Make large circles drawn with the circle tool not look all jaggy.
* Fix: Make large rectangles close properly with MyPaint brushes. Thanks haxekhaex2 for reporting.

2023-11-12 Version 2.2.0-beta.10
* Fix: Don't deadlock on first startup. Thanks to Hail, lowontrash, FARBOL234, Dorokinyo and hamlin for reporting.
Expand Down
2 changes: 1 addition & 1 deletion src/libclient/tools/shapetools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PointVectorGenerator {
QLineF line{m_pv.last(), point};
int segments = qCeil(line.length() / SEGMENT_LENGTH);
for(int i = 1; i < segments; ++i) {
appendPoint(line.pointAt(1.0 / qreal(segments)));
appendPoint(line.pointAt(1.0 / qreal(segments) * qreal(i)));
}
}
appendPoint(point);
Expand Down

0 comments on commit 71443d8

Please sign in to comment.