Commit bcde712f authored by Peter Simonsson's avatar Peter Simonsson
Browse files

* Make KivioAbstractPage a KoShapeControllerBase

* Make it possible to set th KoShapeControllerBase in KoShapeController
* Fix KoShapeManager::setShapes() so that is does what it says it does :)


svn path=/trunk/koffice/; revision=607593
parent d113dc3b
......@@ -63,13 +63,20 @@ public:
/**
* @brief Remove a shape from the document.
*
* @param shape to remove from thr document
* @param shape to remove from the document
*
* @return command which will remove the shape from the document.
* The command is not yet executed.
*/
KCommand* removeShape( KoShape *shape );
/**
* @brief Set the KoShapeControllerBase used to add/remove shapes
*
* @param shapeControllerBase the new shapeControllerBase
*/
void setShapeControllerBase(KoShapeControllerBase* shapeControllerBase) { m_shapeController = shapeControllerBase; }
private:
KoCanvasBase *m_canvas;
KoShapeControllerBase *m_shapeController;
......
......@@ -69,8 +69,8 @@ void KoShapeManager::setShapes( const QList<KoShape *> &shapes )
m_tree.remove( shape );
shape->removeShapeManager( this );
}
m_shapes = shapes;
foreach(KoShape *shape, m_shapes)
m_shapes.clear();
foreach(KoShape *shape, shapes)
{
add( shape );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment