Comment 55 for bug 799202

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

The Krita code that deals with tablet events seems to be this in kis_canvas_controller.cpp:

-----

void KisCanvasController::Private::emitPointerPositionChangedSignals(QEvent *event)
{
    if (!coordinatesConverter) return;
    QPoint pointerPos;
    QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent*>(event);
    if (mouseEvent) {
        pointerPos = mouseEvent->pos();
    } else {
        QTabletEvent *tabletEvent = dynamic_cast<QTabletEvent*>(event);
        if (tabletEvent) {
            pointerPos = tabletEvent->pos();
        }
    }

----

The obvious failure point being that if the argument is neither a mouse nor a tablet event, then pointerPos is uninitialized. I did not have time to check yet whether the bug is caused by this or something else entirely.