Skip to content

Mirrored cancel function from rect-tool to box3d-tool to finish TODO

KOFOB requested to merge KOFOB/inkscape:box3d-tool-cancel into master

For pretty much every tool, like rect-tool, spiral tool or star-tool it is possible to cancel it, while creating an object by dragging, by pressing the ESC-key.

This was still missing for the box3d-too, which was also noted in a TODO, which I have subsequently removed.

This functionality was implemented by perfectly mirroring the behaviour of those other mentioned tools. This meant implementing a dedicated cancel-function, which again is just mirrored over, with changed names. This function is then used in the before mentioned scenario but also in another case:

The creation of 3D boxes with size 0 is now always cancelled, which is again just mirroring the other tools behaviour. This check for size 0 is done by checking whether the two points (orig_corner0 and orig_corner7) spanning the cube coincide in at least two dimensions, as this means that they only span a 1D line in 3D space, which is invisible and thus should not be created.

Merge request reports