Commit ef4dcd4d authored by Christoffer Ackelman's avatar Christoffer Ackelman

Trying to fix the scrollbars in flow.

parent b7d2a844
......@@ -686,9 +686,9 @@ void FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
case QEvent::Wheel: {
QWheelEvent* wheelEvent = ((QWheelEvent*)event);
if (wheelEvent->delta() > 0) {
sts = ctx->event_handler(flow_eEvent_ScrollUp, 0, 0, 0, 0);
sts = ctx->event_handler(flow_eEvent_ScrollUp, wheelEvent->x(), wheelEvent->y(), 0, 0);
} else if (wheelEvent->delta() < 0) {
sts = ctx->event_handler(flow_eEvent_ScrollDown, 0, 0, 0, 0);
sts = ctx->event_handler(flow_eEvent_ScrollDown, wheelEvent->x(), wheelEvent->y(), 0, 0);
}
break;
}
......@@ -746,9 +746,7 @@ void FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
}
case QEvent::Paint:
case QEvent::UpdateRequest: {
QPaintEvent* paintEvent = ((QPaintEvent*)event);
sts = ctx->event_handler_nav(
flow_eEvent_Exposure, paintEvent->rect().x(), paintEvent->rect().y());
sts = ctx->event_handler_nav(flow_eEvent_Exposure, 0, 0);
nav_wind.window->update();
break;
}
......@@ -771,7 +769,7 @@ void FlowDrawQt::event_handler(FlowCtx* ctx, QEvent* event, QWidget* target)
return;
}
toplevel->update();
m_wind.window->update();
}
void FlowDrawQt::enable_event(FlowCtx* ctx, flow_eEvent event, flow_eEventType event_type,
......@@ -1032,7 +1030,7 @@ bool FlowDrawQt::draw_timer_cb()
{
draw_timer_id->stop();
(draw_timer_callback_func)(ctx);
toplevel->update();
m_wind.window->update();
return FALSE;
}
......
......@@ -1287,7 +1287,6 @@ int FlowCtx::event_handler_nav(flow_eEvent event, int x, int y)
case flow_eEvent_Exposure:
fdraw->get_window_size(navw, &nav_window_width, &nav_window_height);
nav_zoom();
change_scrollbar();
break;
case flow_eEvent_ButtonMotion:
if (nav_rect_movement_active) {
......
......@@ -827,10 +827,6 @@ void GlowDrawQt::event_handler(QEvent* event, QWidget* target)
glow_eEvent_ButtonRelease, mouseEvent->x(), mouseEvent->y());
break;
}
case QEvent::Show: {
sts = ctx->event_handler_nav(glow_eEvent_Exposure, 0, 0);
break;
}
case QEvent::Paint:
case QEvent::UpdateRequest: {
sts = ctx->event_handler_nav(glow_eEvent_Exposure, 0, 0);
......@@ -857,7 +853,6 @@ void GlowDrawQt::event_handler(QEvent* event, QWidget* target)
}
m_wind.window->update();
return;
}
void GlowDrawQt::enable_event(glow_eEvent event, glow_eEventType event_type,
......
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