Skip to content
Permalink
Browse files

Fix polyline tool quicksize cursor rendering

The quicksize cursor for the polyline tool was being cropped
because feather = -1 so the width was being subtracted by -1. This
was particularly noticable when zoomed in lots.
  • Loading branch information...
scribblemaniac committed Apr 11, 2019
1 parent d3a41d3 commit fddf8465ea82300ee83cce030965757de7fabad9
Showing with 2 additions and 2 deletions.
  1. +2 −2 core_lib/src/tool/basetool.cpp
@@ -246,8 +246,8 @@ QCursor BaseTool::selectMoveCursor(MoveMode mode, ToolType type)
*/
QPixmap BaseTool::quickSizeCursor(float brushWidth, float brushFeather, float scalingFac)
{
float propWidth = brushWidth * scalingFac;
float propFeather = brushFeather * scalingFac;
float propWidth = qMax(static_cast<float>(0), brushWidth) * scalingFac;
float propFeather = qMax(static_cast<float>(0), brushFeather) * scalingFac;
float cursorWidth = propWidth + 0.5 * propFeather;

if (cursorWidth < 1) { cursorWidth = 1; }

0 comments on commit fddf846

Please sign in to comment.
You can’t perform that action at this time.