"Expand from centre" not working properly with Crop tool and other tools based on GimpToolRectangle
Environment/Versions
- GIMP version: 2.10.34
- Package: Installer from Gimp.org
- Operating System: Windows 10 64bit (1809)
Description of the bug
When trying to draw a box with the cropping tool, the square selection I make will change when releasing the mouse button, adjusting to the point under the cursor as if the aspect ratio lock and expand from centre are disabled.
I have made sure I am not releasing Ctrl or Shift too early (which I was doing to 'fix' the Aspect ratio and 'disable' Expand from centre temporarily) but achieve the same result when using different images and different aspect ratios (both in the images themselves and the set aspect of the crop tool). The same effect happens with the rectangle select tool, but only the guide-lines/box changes size, while the selection (marching ants) are correct.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Select the Crop tool, enable "Expand from centre" and disable "Fixed aspect ratio" in the tool options.
- Left click to start the tool and then hold CTRL and SHIFT keys while dragging the mouse
- Release the left mouse button and then the keys.
…
Expected result: The selection should be the same as what was drawn prior to releasing the left mouse button.
Actual result: The selection will now be to the position of the cursor where the left mouse button was released and as if "expand from centre" and "lock aspect ratio" are disabled; not where the guide-line/box was displaying prior to release.