Skip to content
Snippets Groups Projects
Commit 3a9a73d3 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fixed a tool activation when the current layer is not enabled

Way to reproduce:
1) Open new document
2) Disable a layer with a mouse
3) Enable a layer with a tablet
You will not be able to paint with the tablet.

What actually happened was that a new CanvasData was created, but
the previous tool could not be activated in the new data, because of
an explicit check in switchTool. So that we ended up in a state with
no tool at all.

This patch brings a bit more consistency there. Now you can always
switch the tool in the KoToolManager, even when active layer is
disabled, but the KoToolProxy will get information about the new tool
only when the layer gets enabled back. This is what the code in
currentLayerChanged() and toolCanBeUsed() has been doing before. There was
inconsistency in postSwitchTool(), because it didn't check for the
availability of the active layer, now it is gone.

BUG:277047
parent d406fb72
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment