Commit 59320c42 authored by C. Boemann's avatar C. Boemann
Browse files

Fix crash on inserting what amounts to a new page (either enough text or page break)

BUG: 305006
parent e5fe7eba
......@@ -98,7 +98,7 @@ public slots:
* @param shape the shape to add
* @param repaint if true it will trigger a repaint of the shape
*/
void addShape(KoShape *shape, Repaint repaint = PaintShapeOnAdd);
void addShape(KoShape *shape, KoShapeManager::Repaint repaint = PaintShapeOnAdd);
/**
* Add an additional shape to the manager.
......
......@@ -175,7 +175,7 @@ void KWDocument::addShape(KoShape* shape, KoTextAnchor* anchor)
addFrameSet(frame->frameSet());
}
emit shapeAdded(shape);
emit shapeAdded(shape, KoShapeManager::PaintShapeOnAdd);
shape->update();
}
......@@ -422,8 +422,8 @@ void KWDocument::addFrame(KWFrame *frame)
{
kDebug(32001) << "frame=" << frame << "frameSet=" << frame->frameSet();
//firePageSetupChanged();
emit resourceChanged(Words::CurrentFrameSetCount, m_frameSets.count());
emit shapeAdded(frame->shape(), KoShapeManager::AddWithoutRepaint);
emit resourceChanged(Words::CurrentFrameSetCount, m_frameSets.count());
}
void KWDocument::removeFrame(KWFrame *frame)
......
......@@ -223,7 +223,7 @@ signals:
void pageSetupChanged();
/// emitted whenever a shape is added.
void shapeAdded(KoShape *, KoShapeManager::Repaint repaint = KoShapeManager::PaintShapeOnAdd);
void shapeAdded(KoShape *, KoShapeManager::Repaint);
/// emitted whenever a shape is removed
void shapeRemoved(KoShape *);
......
......@@ -69,7 +69,7 @@ KoView *KWPart::createViewInstance(QWidget *parent)
void KWPart::setupViewInstance(KWView *view)
{
connect(m_document, SIGNAL(shapeAdded(KoShape *)), view->canvasBase()->shapeManager(), SLOT(addShape(KoShape *)));
connect(m_document, SIGNAL(shapeAdded(KoShape *, KoShapeManager::Repaint)), view->canvasBase()->shapeManager(), SLOT(addShape(KoShape *, KoShapeManager::Repaint)));
connect(m_document, SIGNAL(resourceChanged(int, const QVariant &)), view->canvasBase()->resourceManager(), SLOT(setResource(int, const QVariant &)));
bool switchToolCalled = false;
......
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