Bug 724692 - Canvas rotation stuck with specific order of actions

Desktop / GNOME / GIMP - Jehan [girinstud.io] - 14 April 2018 13:36 EDT

Commit b279c2d217 was breaking a specific use case, which I oversaw: when space bar activates the move tool, you may want to release the space bar while mouse button is pressed, and expect to still be able to move the layer/selection/guide, but releasing space was stopping the move immediately. The move tool must only be deactivated when both space and button 1 are released, and the move itself must continue as long as button 1 is pressed (when started while space was pressed).

As a nice side effect of this commit, panning and canvas rotation are also improved since now they can be continued while releasing space (respectively shift-space) if mouse button 1 was pressed, and up until the mouse button is released. Pressing space again, then releasing the mouse, back and forth, also work as expected (i.e. move tool stay activated though the move stops; and panning or rotation continue).

Of course now we don't get anymore panning/rotation stuck while neither space nor mouse buttons are pressed (which was the original bug). At least one of these need to stay pressed for panning/rotation/move to stay activated. And initial activation is obviously always through (shift-)space only.

3ac794816a Bug 724692 - Canvas rotation stuck with specific order of actions.
app/display/gimpdisplayshell-tool-events.c | 54 ++++++++++++++++++++++++------
app/display/gimpdisplayshell.h | 6 ++++
2 files changed, 49 insertions(+), 11 deletions(-)

Upstream: git.gnome.org


  • Share