Bug 501474

Summary: Krita reports the wrong rectangular selection dimensions when in Intersection mode.
Product: [Applications] krita Reporter: strumbore88
Component: Tools/SelectionAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: halla, nicholaslapointe8
Priority: NOR    
Version First Reported In: 5.2.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: attachment-2642255-0.html

Description strumbore88 2025-03-14 05:32:09 UTC
SUMMARY

It is helpful to know the dimensions of the current rectangular selection. Unfortunately, Krita misreports that information in the Tool Options section under Width and Height when the Action is set to Intersect. Unlike Photoshop, selections that begin outside the canvas are not immediately cropped to the canvas space on completion. A workaround for this is to select the entire canvas, change the Rectangular Selection tool's Action mode to Intersect, and make your selection. Now the region is cropped to the canvas space. However, Krita only reports the most recent rectangular dimensions before the intersection happens. This makes verifying dimensions for trim sheets incredibly frustrating as even snapping to guides doesn't work reliably, which is another issue.

STEPS TO REPRODUCE
1. Choose the Rectangular Selection tool.
2. Go to the Tool Options area.
3. Change the Action mode to "Intersect".
4. Select the entire canvas.
5. make a rectangular selection that begins outside the canvas and ends inside the canvas.

OBSERVED RESULT

The resulting region will be cropped to the canvas, as intended, but Krita will report the dimensions of the original selection before the intersection happens...which is useless information and NOT what the dimensions of that selection is!

EXPECTED RESULT

Krita should report the Width and Height dimensions of the current (final) selection, which is the intersected selection.

SOFTWARE/OS VERSIONS
Microsoft Windows 11 Home: 10.0.22621 Build 22621
Krita 5.2.6 (git ab3502b)
 
ADDITIONAL INFORMATION

Quality-of-Life suggestion: When I am using that rectangular selection tool, I want it to crop to the canvas region by default. Barring that, when I look in the Tool Options for that tool, I want to see a toggle to automatically crop all selections to the canvas. The Width and Height dimensions of a selection should ALWAYS report correctly!
Comment 1 Halla Rempt 2025-03-14 07:45:47 UTC
Nope. Not a bug. This is how Krita works, deal with it. Comparisons with Photoshop are irrelevant.
Comment 2 strumbore88 2025-03-14 09:53:52 UTC
Created attachment 179386 [details]
attachment-2642255-0.html

Hi Halla Rempt,

Please explain what the intended functionality of the Width and Height
feature is that makes displaying incorrect dimensions the intended
functionality.

On Fri, Mar 14, 2025 at 3:17 AM Halla Rempt <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=501474
>
> Halla Rempt <halla@valdyas.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|---                         |NOT A BUG
>              Status|REPORTED                    |RESOLVED
>                  CC|                            |halla@valdyas.org
>
> --- Comment #1 from Halla Rempt <halla@valdyas.org> ---
> Nope. Not a bug. This is how Krita works, deal with it. Comparisons with
> Photoshop are irrelevant.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 strumbore88 2025-03-14 09:55:36 UTC
(In reply to Halla Rempt from comment #1)
> Nope. Not a bug. This is how Krita works, deal with it. Comparisons with
> Photoshop are irrelevant.

Uh...can somebody explain how this is the intended behavior? The width and height fields display the wrong dimensions for the selection that's on the screen. I think Halla Rempt is confused.
Comment 4 Nicholas LaPointe 2025-03-14 15:35:42 UTC
The tricky thing is that selections are not necessarily rectangular or contiguous, so it's more practical to display only the dimensions of the selection preformed by the user (this approach is also used by GIMP, at least).

If you are looking for the bounding dimensions of the selection, those can be seen by hovering over the selection mask icon at the bottom-left of the window (to the left of the current brush name). This is more likely what you are looking for, and when I follow your reproduction steps, it ends up displaying the canvas dimensions.
Comment 5 strumbore88 2025-03-14 19:32:38 UTC
(In reply to Nicholas LaPointe from comment #4)
> The tricky thing is that selections are not necessarily rectangular or
> contiguous, so it's more practical to display only the dimensions of the
> selection preformed by the user (this approach is also used by GIMP, at
> least).
> 
> If you are looking for the bounding dimensions of the selection, those can
> be seen by hovering over the selection mask icon at the bottom-left of the
> window (to the left of the current brush name). This is more likely what you
> are looking for, and when I follow your reproduction steps, it ends up
> displaying the canvas dimensions.

Thank you, this was helpful information. I do hope that those Width and Height fields will report what is currently selected in the near future because that seems to be the intent of the feature.