Diffusion Krita a6ed77cc6f6a

Fix division by zero when resizing 0px-width shapes (lines)

Authored by dkazakov on Mar 20 2020, 8:30 PM.

Description

Fix division by zero when resizing 0px-width shapes (lines)

Some shapes, e.g. lines, may have null width or shapes. These shapes
cannot be resized in the null-dimension. We should handle that properly.

  • ShapeResizeStrategy should not divide by zero, it is a bad habit
  • DefaultToolGeometryWidget should not divide by zero as well
  • DefaultToolGeometryWidget should block size spin boxes, when a shape is not resizable [1]
  • DefaultToolGeometryWidget should block aspect ration button in an unlocked position, when one of the shape's dimensions is not editable (read, null)
  • KisAlgebra2D::absoluteToRelative() should not divide by zero. Mapping a point to a null-width shape works as projecting this point to the line

(cherry picked from commit 345d51ce3d78d01aaca819d5665e951321598526)

Details

Committed
remptApr 2 2020, 1:09 PM
Parents
R37:b8b215029a33: pkg macOS: dont build cli app for x265
Branches
Unknown
Tags
Unknown