Bug 408182 - Scaling with the transform tool deletes the selection
Summary: Scaling with the transform tool deletes the selection
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: 4.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-06-01 17:48 UTC by daefunct
Modified: 2023-08-02 03:44 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Demonstration of bug (502.23 KB, video/mp4)
2022-07-12 18:51 UTC, Unciaa Leonard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description daefunct 2019-06-01 17:48:12 UTC
SUMMARY
Scaling with the transform tool deletes the selection. Sometimes it'll work but most of the time it doesn't.

STEPS TO REPRODUCE
1. make a selection with lasso, box, circle etc.
2. transform (ctrl+t)
3. scale
4. press enter

OBSERVED RESULT
the selected pixels are deleted

EXPECTED RESULT
scale transformation

SOFTWARE/OS VERSIONS
Krita 4.2.0 release
Windows 10 (64 bit)
Intel(R) Core(TM) i5-6400
Radeon RX 580 Series
Radeon Software Version - 19.4.1
Comment 1 Ahab Greybeard 2019-06-02 03:53:51 UTC
I don't see this on the 4.2.0 appimage for a variety of selection methods and a variety of transforms. Windows Only?

Krita

 Version: 4.2.0
 Languages: en_GB, en
 Hidpi: true

Qt

  Version (compiled): 5.12.2
  Version (loaded): 5.12.2

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.9.0-9-amd64
  Pretty Productname: Debian GNU/Linux 9 (stretch)
  Product Type: debian
  Product Version: 9
Comment 2 Ahab Greybeard 2019-06-02 06:35:39 UTC
I just tested this on Windows with no problems with a variety of selection and transform types.

Krita

 Version: 4.2.0
 Languages: en_US
 Hidpi: false

Qt

  Version (compiled): 5.12.2
  Version (loaded): 5.12.2

OS Information

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

If it's of any relevance, I use OpenGL:

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 388.13" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::sRGBColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false
Comment 3 vanyossi 2019-06-02 22:36:03 UTC
Hey! have your tried using ANGLE for the display options? I preferences activate  Canvas acceleration using ANGLE and not OpenGL undir display options. For windows the rendering engine is recommended to be set to ANGLE as openGL can give problems.
Comment 4 daefunct 2019-06-03 08:53:34 UTC
I noticed I can scale up just fine but I can't scale down at certain percentages. I can scale down to 50% but not 51%. I think about half of the percentages from 1%-98% don't work. The selection reappears if I press ctrl+t again then scale it to something that works.

(In reply to Ahab Greybeard from comment #1)
Yeah, it's Windows only. I just gave Ubuntu a try and its working fine.

(In reply to Ahab Greybeard from comment #2)
(In reply to vanyossi from comment #3)
Yep I tried both OpenGL and ANGLE but still the same result.
Comment 5 Ahab Greybeard 2019-06-03 09:53:53 UTC
On Windows 10, krita 4.2.0, using Direct3D 11 via ANGLE, I've just tried a scale down to 49%, 50%, 51% and a variety of random percentages around there, with no problems.

Is it possible that this is related to your use of Radeon?
Comment 6 daefunct 2019-06-03 11:37:43 UTC
I Just tried it without the radeon card. Still the same. It works with all other filter options except nearest neighbor.
Comment 7 Halla Rempt 2019-06-03 12:24:08 UTC
This has nothing to do with opengl or angle; it's a bug in the transform tool, and a pretty bad one. I can easily reproduce this by trying to scale any image to 51%.
Comment 8 Ahab Greybeard 2019-06-03 12:52:10 UTC
Nearest Neighbour ..... yes, that does it.
Comment 9 Halla Rempt 2019-06-03 14:10:58 UTC
Hmm... And only since 4.2, we've got a real nearest neighbour. Assigning to Tymond.
Comment 10 Tiar 2019-06-06 12:24:38 UTC
Git commit 3dfad538fc943dd1670dc14dc224df49a421f805 by Agata Cacko.
Committed on 06/06/2019 at 12:23.
Pushed by tymond into branch 'master'.

Fix NN algorithm for certain percentages

Before this commit, some percentages of scale would result
in the content disappearing after using Transform Tool.
Adding more support to the filter strategy in this commit
ensures that the correct pixel is added to the pool of possible
pixels for NN algorithm.

M  +3    -1    libs/image/kis_filter_strategy.h

https://invent.kde.org/kde/krita/commit/3dfad538fc943dd1670dc14dc224df49a421f805
Comment 11 Halla Rempt 2019-06-06 12:50:52 UTC
Git commit 48182ce4bcc12d3a1444284cffd411223fc77647 by Boudewijn Rempt, on behalf of Agata Cacko.
Committed on 06/06/2019 at 12:50.
Pushed by rempt into branch 'krita/4.2'.

Fix NN algorithm for certain percentages

Before this commit, some percentages of scale would result
in the content disappearing after using Transform Tool.
Adding more support to the filter strategy in this commit
ensures that the correct pixel is added to the pool of possible
pixels for NN algorithm.

M  +3    -1    libs/image/kis_filter_strategy.h

https://invent.kde.org/kde/krita/commit/48182ce4bcc12d3a1444284cffd411223fc77647
Comment 12 DancingFerret 2022-01-05 16:05:24 UTC
I get this exact bug on Krita 5.0.0

Steps to reproduce:
1. make a selection
2. transform
3. scale & apply
4. do something that causes the layer to redraw (Move it around, hide&unhide it, etc)

Observed result:
selection is deleted

Expected:
scaled transformation

Software versions:
Krita 5.0.0
Windows 10 (64 bit)
AMD Ryzen 5 5600X
NVIDIA GeForce RTX 3070 Ti
Driver version 497.29
Comment 13 Dmitry Kazakov 2022-04-13 08:56:49 UTC
Hm.. I don't seem to be able to reproduce this bug :(
Comment 14 Dmitry Kazakov 2022-07-11 15:26:46 UTC
Hi, DancingFerret!

Could you please make a video recording of the bug? Neither of us can reproduce the issue, perhaps you use some special options or image size?
Comment 15 Unciaa Leonard 2022-07-12 18:51:59 UTC
Created attachment 150568 [details]
Demonstration of bug

All I've done is create a new document in Krita 5.0.6, drew a squiggly line, lasso selected a portion and manipulated it, then moved the full layer to demonstrate that, while the original selection may still be visible in the draw buffer, it is in fact gone.

This is in Windows 10 on a 2560x1440, 144Hz display, with an nVidia 3070ti and the latest (516.59) drivers, though since the original report was a while ago it's safe to assume neither the specific Krita nor display driver version are required.
Comment 16 Bug Janitor Service 2022-07-27 04:35:57 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 17 Dmitry Kazakov 2023-06-29 13:07:07 UTC
Hi, Unciaa Leonard!

Could you recheck the bug in the latest Krita or Krita-Nightly? I still cannot reproduce the bug, I'm afraid.

And if you still can reproduce the bug, could you tell, what do you do to deselect the selection after pressing Enter key? Do you deselect explicitly or the selection just disappears when you start a new action with the transform tool? It seems like the presence of the selection is (was) involved into the problem.
Comment 18 Dmitry Kazakov 2023-06-29 13:16:20 UTC
I tried to reproduce this bug with Krita-Nightly, Krita 5.0.5 and Krita 5.0.2 and still cannot reproduce the bug :(
Comment 19 Unciaa Leonard 2023-07-03 09:19:34 UTC
I can no longer reproduce the bug with the given steps as of 5.1.5 (Windows), though admittedly I did not think to try and reproduce it again with the old version first prior to updating to rule out a system issue.
Comment 20 Bug Janitor Service 2023-07-18 03:45:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 21 Bug Janitor Service 2023-08-02 03:44:57 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!