Revision 040a948...

Go back to digest for 5th February 2012

Optimization in Office

Dmitry Kazakov committed changes in [calligra/shapes-as-node-model-kazakov] /:

A huge refactoring for KisNodeModel

Now the model doesn't depend on the hierarchy of the image. It uses
the hierarchy of the dummies stored in KiShapeController instead.

Some bullet points:
1) KisShapeController connects to the image and forwards the node
addition/removal signals for other recievers
2) KisNodeModel is connected to the KisShapeController and listens
to the forwarded signals. It follows that it doesn't depend on the image
directly, so there are no problems with multithreading.
2.5) KisNodeModel does not depend on sigLayersChanged() anymore.
3) KisShapeController manages when a node should be activated. It emits
the signal sigActivateNode(KisNodeSP) which is processed by the
KisNodeManager. It solved many problems at once. First, we needn't
workaround moving of nodes (KisNodeManager::Private::activeBeforeMove).
Second we are able to deprecate KisNodeManager::activateNode() now. (It'll be
done in one of next commmits).
4) Fixed KisNodeFacade::lowerNode(). Now newly activated node depends on the node
which is added in the end of the operation, so we should move exactly the node
which was requested.
5) A small refactoring for KisLayerBox is done. It was discussed with Boud on irc.


Not yet fixed issues:
1) I had to disable Bumpmap filter temporarily, because it didn't
compile with changed KisNodeModel. It'll be fixed in the following commits.
2) When loading an image with many layers KisLayerBox does not scroll to
the active layer.

File Changes

Added 1 files
  • krita/sdk/tests/empty_nodes_test.h
Modified 19 files
  •   krita/image/kis_node_facade.cpp
  •   krita/ui/kis_node_manager.cpp
  •   krita/ui/kis_node_manager.h
  •   krita/ui/kis_node_model.cpp
  •   krita/ui/kis_node_model.h
  •   krita/plugins/filters/CMakeLists.txt
  •   krita/ui/flake/kis_node_dummies_graph.cpp
  •   krita/ui/flake/kis_node_dummies_graph.h
  •   krita/ui/flake/kis_node_shape.cpp
  •   krita/ui/flake/kis_shape_controller.cpp
  •   krita/ui/flake/kis_shape_controller.h
  •   krita/ui/tests/kis_node_dummies_graph_test.cpp
  •   krita/ui/tests/kis_node_dummies_graph_test.h
  •   krita/ui/tests/kis_node_model_test.cpp
  •   krita/ui/tests/kis_node_model_test.h
  •   krita/ui/tests/kis_shape_controller_test.cpp
  •   krita/ui/tests/kis_shape_controller_test.h
  •   krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
  •   krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h
20 files changed in total