Commit 44990221 authored by Thorsten Zachmann's avatar Thorsten Zachmann

o repaint the decorations before we deactivate the tool as deactivate

  might delete data needed for the repaint.
  This fixes a crash in the KarbonGradientTool when more then one object
  was edited at the same time and it was switched to a different tool.

svn path=/trunk/koffice/; revision=649703
parent 6c8b31aa
......@@ -277,6 +277,9 @@ void KoToolManager::switchTool(KoTool *tool, bool temporary) {
if (d->canvasData->activeTool) {
foreach(QAction *action, d->canvasData->activeTool->actions().values())
// repaint the decorations before we deactivate the tool as it might deleted
// data needed for the repaint
disconnect(d->canvasData->activeTool, SIGNAL(sigCursorChanged(QCursor)),
this, SLOT(updateCursor(QCursor)));
......@@ -285,7 +288,6 @@ void KoToolManager::switchTool(KoTool *tool, bool temporary) {
disconnect(d->canvasData->activeTool, SIGNAL(sigActivateTemporary(const QString &)),
this, SLOT(switchToolTemporaryRequested(const QString &)));
disconnect(d->canvasData->activeTool, SIGNAL(sigDone()), this, SLOT(switchBackRequested()));
d->canvasData->activeTool = tool;
connect(d->canvasData->activeTool, SIGNAL(sigCursorChanged(QCursor)),
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