[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/libs/flake
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-01-20 17:14:18
Message-ID: 1232471658.443599.744.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 914222 by zachmann:

o Fix crash described in bug 181373.
  Some background to the bug:
  The text tool got disabled and after that it was still used as the
  canvas still had the tool set when inputMethodQuery was called.

BUG: 181373



 M  +9 -3      KoToolManager.cpp  


--- trunk/koffice/libs/flake/KoToolManager.cpp #914221:914222
@@ -340,6 +340,15 @@
     }
 
     d->canvasData->activeTool = tool;
+
+    // make sure the old tool will not be called after it has been deactivated
+    if (d->canvasData->canvas->canvas()) {
+        KoCanvasBase *canvas = d->canvasData->canvas->canvas();
+        KoToolProxy *tp = d->proxies.value(canvas);
+        if (tp)
+            tp->setActiveTool(d->canvasData->activeTool);
+    }
+
     connect(d->canvasData->activeTool, SIGNAL(cursorChanged(QCursor)),
             this, SLOT(updateCursor(QCursor)));
     connect(d->canvasData->activeTool, SIGNAL(activateTool(const QString &)),
@@ -380,9 +389,6 @@
 #endif
     if (d->canvasData->canvas->canvas()) {
         KoCanvasBase *canvas = d->canvasData->canvas->canvas();
-        KoToolProxy *tp = d->proxies.value(canvas);
-        if (tp)
-            tp->setActiveTool(d->canvasData->activeTool);
         canvas->updateInputMethodInfo();
     }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic