Bug 423452 - Can move layers by entering positions in the tool options the first time, but not the second time
Summary: Can move layers by entering positions in the tool options the first time, but...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Move (show other bugs)
Version: 4.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-24 15:51 UTC by Kenneth So
Modified: 2020-10-29 12:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth So 2020-06-24 15:51:48 UTC
SUMMARY
Can move layers by entering positions in the tool options the first time, but not the second time

STEPS TO REPRODUCE
1. Open a new image
2. Select an area
3. Copy and paste to create a new layer
4. Select move tool
5. You can move the active layer by entering the positions in the tool options
6. Select Shapes Tool
7. Deselect all
8. Select move tool again
9. Try moving the active layer by entering the positions in the tool options

OBSERVED RESULT
The layer does not move and the position get reset when clicking on the empty area of the picture.

EXPECTED RESULT
The layer will be successfully moved

SOFTWARE/OS VERSIONS
Windows: 10 (1809)
Krita version: 4.3.0

ADDITIONAL INFORMATION
Originally posted and demo video available in reddit at https://www.reddit.com/r/krita/comments/hefjt1/any_reason_why_i_can_move_layers_by_entering/
Comment 1 Raghavendra kamath 2020-06-24 16:58:59 UTC
I can confirm this on master branch. User can't move second time by entering values in the input box
Comment 2 Dmitry Kazakov 2020-10-29 12:21:22 UTC
Git commit efe9ed8c0e5c5211a66919290dcff7e907e48840 by Dmitry Kazakov, on behalf of Mathias Wein.
Committed on 29/10/2020 at 12:20.
Pushed by dkazakov into branch 'krita/4.3'.

Fix malfunction of x/y position spin boxes in move tool's options

The signal connections had to be moved from the constructor to
activate(), since they get disconnected on every deactivate().

Also, manipulating the x or y position without clicking on the canvas first
doubled the initial value, because a new stroke gets created, which in turn
resets the handle rect.
Reading the value before starting the stroke and making sure it's not
currently unavailable until recalculated should prevent it.
Related: bug 420329

M  +23   -10   plugins/tools/basictools/kis_tool_move.cc

https://invent.kde.org/graphics/krita/commit/efe9ed8c0e5c5211a66919290dcff7e907e48840
Comment 3 Dmitry Kazakov 2020-10-29 12:22:45 UTC
Git commit 12b3293d4987291e044bd4e52070a7e54f7e73dc by Dmitry Kazakov, on behalf of Mathias Wein.
Committed on 29/10/2020 at 11:37.
Pushed by dkazakov into branch 'master'.

Fix malfunction of x/y position spin boxes in move tool's options

The signal connections had to be moved from the constructor to
activate(), since they get disconnected on every deactivate().

Also, manipulating the x or y position without clicking on the canvas first
doubled the initial value, because a new stroke gets created, which in turn
resets the handle rect.
Reading the value before starting the stroke and making sure it's not
currently unavailable until recalculated should prevent it.
Related: bug 420329

M  +23   -10   plugins/tools/basictools/kis_tool_move.cc

https://invent.kde.org/graphics/krita/commit/12b3293d4987291e044bd4e52070a7e54f7e73dc