Commit ec09af95 authored by Stefano Bonicatti's avatar Stefano Bonicatti

Fix for crash while closing document and moving the stylus

Now it is checked if the object who should receive the event is null or not.

Restored the usage of retval.

BUG:342782
parent c1fb230c
......@@ -861,21 +861,23 @@ bool KisInputManager::eventFilter(QObject* object, QEvent* event)
bool KisInputManager::Private::handleKisTabletEvent(QObject *object, KisTabletEvent *tevent)
{
if(object == 0) return false;
bool retval = false;
QTabletEvent qte = tevent->toQTabletEvent();
qte.ignore();
q->eventFilter(object, &qte);
retval = q->eventFilter(object, &qte);
tevent->setAccepted(qte.isAccepted());
if (!retval && !qte.isAccepted()) {
QMouseEvent qme = tevent->toQMouseEvent();
qme.ignore();
q->eventFilter(object, &qme);
retval = q->eventFilter(object, &qme);
tevent->setAccepted(qme.isAccepted());
}
return tevent->isAccepted();
return retval;
}
void KisInputManager::slotCompressedMoveEvent()
......
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