Commit 60e5f9c0 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Redraw everything on Qt Paint request.

parent 3c2e9f25
......@@ -623,6 +623,7 @@ int FlowDrawQt::event_handler(QEvent* event, QWidget* target)
case QEvent::Paint:
case QEvent::UpdateRequest: {
QPaintEvent* paintEvent = ((QPaintEvent*)event);
basectx->clear();
sts = basectx->event_handler(flow_eEvent_Exposure, paintEvent->rect().x(),
paintEvent->rect().y(), paintEvent->rect().width(),
paintEvent->rect().height());
......@@ -741,7 +742,6 @@ int FlowDrawQt::event_handler(QEvent* event, QWidget* target)
} else if (wheelEvent->delta() < 0) {
sts = basectx->event_handler(flow_eEvent_ScrollDown, 0, 0, 0, 0);
}
basectx->clear(); // For some reason, flow does not redraw after scrolling
break;
}
default:
......
......@@ -690,6 +690,7 @@ int GlowDrawQt::event_handler(QEvent* event, QWidget* target)
case QEvent::Paint:
case QEvent::UpdateRequest: {
QPaintEvent* paintEvent = ((QPaintEvent*)event);
ctx->clear(&ctx->mw);
sts = ctx->event_handler(glow_eEvent_Exposure, paintEvent->rect().x(),
paintEvent->rect().y(), paintEvent->rect().width(),
paintEvent->rect().height());
......@@ -808,7 +809,6 @@ int GlowDrawQt::event_handler(QEvent* event, QWidget* target)
sts = ctx->event_handler(
glow_eEvent_ScrollDown, wheelEvent->x(), wheelEvent->y(), 0, 0);
}
basectx->clear(); // For some reason, glow does not redraw after scrolling
break;
}
default:
......
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