Bug 290812 - Toolbox is not deactivated/reactivated after changing visibility of Shape Layer
Summary: Toolbox is not deactivated/reactivated after changing visibility of Shape Layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-06 17:25 UTC by Dmitry Kazakov
Modified: 2012-01-07 07:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2012-01-06 17:25:14 UTC
1) Add a shape layer
2) Change its visibility or locking
Nothing happens with the toolbox

Expected:
Toolbox gets deactivated/reactivated like it is done when changing visibility of usual layers

Reason:
We switch KoShapeManager in KisCanvas2::shapeManager(), that looks like to be  wrong according to the design of flake, because KoToolManager connects to the global shape manager in the constructor of the KisView2.

We must avoid switching KoShapeManager in KisCanvas2 and forward selections from KisShapeLayer objects on some other way.
Comment 1 Dmitry Kazakov 2012-01-06 17:48:17 UTC
Or forward KoSelection::currentLayerChanged() as well
Comment 2 Dmitry Kazakov 2012-01-07 07:50:09 UTC
Git commit 28e0cc78e19bae1381ed0f9987635d5af31a7b89 by Dmitry Kazakov.
Committed on 07/01/2012 at 09:47.
Pushed by dkazakov into branch 'shapes-as-node-model-kazakov'.

Wrapped KisShapeLayer in KisNodeShape, fix signals for flake

To make node add/remove signals asynchronous we need to store
shared pointer of KisShapeLayer, so lets just wrap it into the
node shape. It'll make the life of maintaining siblings data easier.

This patch fixes layer activation signals as well. See comment in
KisCanvas2::KisCanvas2.

M  +17   -0    krita/ui/canvas/kis_canvas2.cpp
M  +0    -2    krita/ui/flake/kis_node_shape.h
M  +43   -30   krita/ui/flake/kis_shape_controller.cpp
M  +1    -0    krita/ui/flake/kis_shape_controller.h
M  +2    -6    krita/ui/flake/kis_shape_layer.cc
M  +10   -4    krita/ui/flake/kis_shape_layer.h

http://commits.kde.org/calligra/28e0cc78e19bae1381ed0f9987635d5af31a7b89