Bug 379411 - Tool switches to rectangle tool when trying to use panning shortcut
Summary: Tool switches to rectangle tool when trying to use panning shortcut
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: 3.1.3
Platform: Microsoft Windows Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-01 18:28 UTC by Andy Statia
Modified: 2017-11-28 06:49 UTC (History)
2 users (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 Andy Statia 2017-05-01 18:28:52 UTC
When trying to use the pan tool via the shortcut (space in this case), the selected tool switches to the draw rectangle tool instead of pan.  One must first click anywhere on the canvas first, then press the shortcut key to get it to properly switch to the pan tool.

Reproduction steps:
1. Select any tool in the tool panel, preferably one with a visibly different cursor than the rectangle tool (fill or pen tool, for example)
2. Press the space bar (for space bar mapping to the pan tool)
3. Note that the tool has switched to the rectangle tool instead of the pan tool
4. After releasing the shortcut key (space bar), the tool does not return to the original tool

Work around steps:
1. Select any tool in the tool panel, preferably one with a visibly different cursor than the rectangle tool (fill or pen tool, for example)
2. Tap the canvas
3. Press the space bar (for space bar mapping to the pan tool)
4. Note that the tool now correctly switches to the pan tool
5. After releasing the shortcut key (space bar), the tool correctly returns to the original tool
Comment 1 Andy Statia 2017-05-02 23:31:33 UTC
I retested this today and found that it is now switching to the colour picker tool when trying to use the span tool shortcut, instead of the rectangle tool.  As such, the alternate tool it switches to may not be stable.
Comment 2 wolthera 2017-05-23 16:27:11 UTC
I cannot reproduce this on KDE Neon. Did you change either the shortcuts or the canvas input settings?
Comment 3 Andy Statia 2017-05-23 16:46:40 UTC
(In reply to wolthera from comment #2)
> I cannot reproduce this on KDE Neon. Did you change either the shortcuts or
> the canvas input settings?

A few shortcuts have been customised, but not for these tools.  Canvas input settings have not been adjusted.  I re-tested just now and today it's switching to the "Freehand Path Tool" when I follow these steps.  It seems to be random each time.  I tried closing Krita, then reopened and repeated these steps.  The tool it selected was then the "Ellipse Tool".  Very bizarre.
Comment 4 Halla Rempt 2017-11-26 13:18:23 UTC
Hi Andy,

Do you have the toolbox floating instead of docked to the Krita window? I've seen something like this today, where if the toolbox was floating, and the cursor hovered over the toolbox, it would activate another tool when pressing space, but I could not reproduce it consistently.
Comment 5 Andy Statia 2017-11-26 22:54:21 UTC
(In reply to Boudewijn Rempt from comment #4)
> Hi Andy,
> 
> Do you have the toolbox floating instead of docked to the Krita window? I've
> seen something like this today, where if the toolbox was floating, and the
> cursor hovered over the toolbox, it would activate another tool when
> pressing space, but I could not reproduce it consistently.

Interesting.  If I dock the tool panel, this behaviour doesn't occur, however your guess as to hovering doesn't seem to be the case.  When it's undocked, it doesn't matter which tool I might cross over, if any, because pressing space always switches to the same (seemingly random) tool for that session.  In my test just now, it kept going back to the crop tool, even if I picked a variety of other tools and never went near the crop tool with my cursor.  There's something amiss with it when undocked it seems.
Comment 6 Halla Rempt 2017-11-27 15:10:23 UTC
That would definitely make it Qt bug... Some issue with focus handling. Unfortunately, that's not something we can work around :-(
Comment 7 Andy Statia 2017-11-28 04:26:15 UTC
(In reply to Boudewijn Rempt from comment #6)
> That would definitely make it Qt bug... Some issue with focus handling.
> Unfortunately, that's not something we can work around :-(

After noting the different behaviour between docked and undocked, I tested a related bug wherein one can't switch to the pan tool after picking a colour from the Reference image panel, unless one taps the canvas first.  When that panel is docked, the bug doesn't occur.  So this seems to impact several things unfortunately.
Comment 8 Halla Rempt 2017-11-28 06:49:28 UTC
Yes, floating dockers and focus problems seem to be common.