Bug 413573 - Show decorations in Tool Options of Transform Tool is broken
Summary: Show decorations in Tool Options of Transform Tool is broken
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-28 22:54 UTC by Tiar
Modified: 2019-11-11 12:03 UTC (History)
2 users (show)

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


Attachments
Example file with Transform Mask that shows the issue (191.66 KB, application/x-krita)
2019-10-28 22:54 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2019-10-28 22:54:04 UTC
Created attachment 123550 [details]
Example file with Transform Mask that shows the issue

SUMMARY
On HighDPI display the decorations that you can turn on using the Show Decorations button (the one next to the spider/recursion button) is displayed differently depending on the zoom. (In my case with 150%, it the decoration showed the original position and size of the selection before making the transformation, but all other zoom levels change the position of the decorations.


STEPS TO REPRODUCE
1. Open the attached file.
2. Select the Transform Tool.
3. Select the Transform Mask.
4. Click on the canvas.
5. Zoom in and out.

OBSERVED RESULT
The grey rectangle is changing its size and position according to canvas because of the zoom level.

EXPECTED RESULT
The grey rectangle should get bigger and smaller depending on the zoom level, but it should keep the same size and position regarding the canvas.

ADDITIONAL NOTES
I used Transform Mask for the example, but it happens with the Transform Tool, too.


SOFTWARE/OS VERSIONS
Krita

 Version: 4.3.0-prealpha (git 745681b)
 Languages: pl, en_US
 Hidpi: true

Qt

  Version (compiled): 5.12.5
  Version (loaded): 5.12.5

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.18362
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10


Hardware Information

  GPU Acceleration: auto
  Memory: 16191 Mb
  Number of Cores: 12
  Swap Location: C:/Users/Agata/AppData/Local/Temp

================================================================================
28 Oct 2019 20:29:45 +0100: Current Settings

Current Swap Location: C:/Users/Agata/AppData/Local/Temp
Undo Enabled: 1
Undo Stack Limit: 30
Use OpenGL: 1
Use OpenGL Texture Buffer: 1
Use AMD Vectorization Workaround: 0
Canvas State: OPENGL_SUCCESS
Autosave Interval: 60
Use Backup Files: 1
Number of Backups Kept: 1
Backup File Suffix: ~
Backup Location: Same Folder as the File
Use Win8 Pointer Input: 0
Use RightMiddleTabletButton Workaround: 0
Levels of Detail Enabled: 0
Use Zip64: 0

Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2019-11-03 19:24:22 UTC
I can confirm this for the latest 4.3.0 prealpha (git 2c21a4c) appimage.

It happens if Hi-DPI is enabled or not (but my display is not Hi-DPI so that may not be relevant).

As well as step 3. Select the Transform Mask, you can do Select the Paint Layer instead and you get the same effect but with the decoration rectangle showing the final transformed result bounding box instead of the source bounding box.

The decoration is not resized on the screen as zoom level is varied. It stays the same size on screen and so appears to change size relative to the canvas.

The decoration offset from 0,0 top left canvas is not resized on the screen and so seems to move across the displayed canvas as zoom is varied.
This becomes apparent if the source or final transform bounding box is made to fit up into the top left of the canvas and the appropriate layer is choosen to show this as decoration. Then it stays in position but has the zoom/size problem as noted before.
Comment 2 Dmitry Kazakov 2019-11-11 11:58:01 UTC
Git commit 8c53a59da010ec2bcd99593d8784023fc3ebd3d9 by Dmitry Kazakov.
Committed on 11/11/2019 at 11:17.
Pushed by dkazakov into branch 'master'.

Remove Show Decorations option from Transform Tool

This option didn't work for several years and noone noticed that. I'm
also not sure it is possible to make it work in a sane way for new
transformation modes, like "Cage" and "Liquify". It seems like the
option didn't work right from implementation of these modes.

M  +3    -21   plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -2    plugins/tools/tool_transform2/kis_tool_transform.h
M  +0    -9    plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
M  +0    -1    plugins/tools/tool_transform2/kis_tool_transform_config_widget.h
M  +1    -8    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp
M  +1    -1    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h
M  +1    -29   plugins/tools/tool_transform2/wdg_tool_transform.ui

https://invent.kde.org/kde/krita/commit/8c53a59da010ec2bcd99593d8784023fc3ebd3d9
Comment 3 Dmitry Kazakov 2019-11-11 12:03:13 UTC
Git commit bee05ee64716bba231073b84bf0d4406affc55f5 by Dmitry Kazakov.
Committed on 11/11/2019 at 12:02.
Pushed by dkazakov into branch 'krita/4.2'.

Remove Show Decorations option from Transform Tool

This option didn't work for several years and noone noticed that. I'm
also not sure it is possible to make it work in a sane way for new
transformation modes, like "Cage" and "Liquify". It seems like the
option didn't work right from implementation of these modes.

M  +3    -21   plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -2    plugins/tools/tool_transform2/kis_tool_transform.h
M  +0    -9    plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
M  +0    -1    plugins/tools/tool_transform2/kis_tool_transform_config_widget.h
M  +1    -8    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp
M  +1    -1    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h
M  +1    -29   plugins/tools/tool_transform2/wdg_tool_transform.ui

https://invent.kde.org/kde/krita/commit/bee05ee64716bba231073b84bf0d4406affc55f5