Commit dcf8bf36 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed XttTrace not updating the view automatically.

parent c539f38d
...@@ -264,13 +264,12 @@ void FlowRect::nav_erase(void* pos, void* node) ...@@ -264,13 +264,12 @@ void FlowRect::nav_erase(void* pos, void* node)
int FlowRect::event_handler( int FlowRect::event_handler(
void* pos, flow_eEvent event, int x, int y, void* node) void* pos, flow_eEvent event, int x, int y, void* node)
{ {
FlowPoint* p; FlowPoint* p = (FlowPoint*)pos;
p = (FlowPoint*)pos; if (ll.z_x + p->z_x - ctx->offset_x <= x
if (ll.z_x + ((FlowPoint*)pos)->z_x - ctx->offset_x <= x && x <= ur.z_x + p->z_x - ctx->offset_x
&& x <= ur.z_x + ((FlowPoint*)pos)->z_x - ctx->offset_x && ll.z_y + p->z_y - ctx->offset_y <= y
&& ll.z_y + ((FlowPoint*)pos)->z_y - ctx->offset_y <= y && y <= ur.z_y + p->z_y - ctx->offset_y) {
&& y <= ur.z_y + ((FlowPoint*)pos)->z_y - ctx->offset_y) {
// std::cout << "Event handler: Hit in rect\n"; // std::cout << "Event handler: Hit in rect\n";
return 1; return 1;
} else } else
......
...@@ -158,7 +158,7 @@ void RtTraceQtWidget::activate_zoomreset() ...@@ -158,7 +158,7 @@ void RtTraceQtWidget::activate_zoomreset()
void RtTraceQtWidget::activate_scantime() void RtTraceQtWidget::activate_scantime()
{ {
rt->scan_time = ((QAction*)sender())->data().toInt(); rt->scan_time = ((QAction*)sender())->data().toFloat();
} }
void RtTraceQtWidget::activate_help() void RtTraceQtWidget::activate_help()
...@@ -339,19 +339,19 @@ RtTraceQt::RtTraceQt(void* tr_parent_ctx, QWidget* tr_parent_wid, ...@@ -339,19 +339,19 @@ RtTraceQt::RtTraceQt(void* tr_parent_ctx, QWidget* tr_parent_wid,
QActionGroup* view_sc_group = new QActionGroup(toplevel); QActionGroup* view_sc_group = new QActionGroup(toplevel);
QAction* a = addMenuRadioItem( QAction* a = addMenuRadioItem(
toplevel, view_sc, "0.50 s", SLOT(activate_scantime()), view_sc_group); toplevel, view_sc, "0.50 s", SLOT(activate_scantime()), view_sc_group);
a->setData(500); a->setData(0.5f);
a = addMenuRadioItem( a = addMenuRadioItem(
toplevel, view_sc, "0.20 s", SLOT(activate_scantime()), view_sc_group); toplevel, view_sc, "0.20 s", SLOT(activate_scantime()), view_sc_group);
a->setData(200); a->setData(0.2f);
a = addMenuRadioItem( a = addMenuRadioItem(
toplevel, view_sc, "0.10 s", SLOT(activate_scantime()), view_sc_group); toplevel, view_sc, "0.10 s", SLOT(activate_scantime()), view_sc_group);
a->setData(100); a->setData(0.1f);
a = addMenuRadioItem( a = addMenuRadioItem(
toplevel, view_sc, "0.05 s", SLOT(activate_scantime()), view_sc_group); toplevel, view_sc, "0.05 s", SLOT(activate_scantime()), view_sc_group);
a->setData(50); a->setData(0.05f);
a = addMenuRadioItem( a = addMenuRadioItem(
toplevel, view_sc, "0.02 s", SLOT(activate_scantime()), view_sc_group); toplevel, view_sc, "0.02 s", SLOT(activate_scantime()), view_sc_group);
a->setData(20); a->setData(0.02f);
// End submenu // End submenu
// End View entry // End View entry
...@@ -426,10 +426,10 @@ RtTraceQt::RtTraceQt(void* tr_parent_ctx, QWidget* tr_parent_wid, ...@@ -426,10 +426,10 @@ RtTraceQt::RtTraceQt(void* tr_parent_ctx, QWidget* tr_parent_wid,
viewsetup(); viewsetup();
flow_Open(flow_ctx, filename); flow_Open(flow_ctx, filename);
mode_trace->setChecked(true);
mode_trace->trigger();
view_sc_group->actions()[0]->setChecked(true); view_sc_group->actions()[0]->setChecked(true);
view_sc_group->actions()[0]->trigger(); view_sc_group->actions()[0]->trigger();
mode_trace->setChecked(true);
mode_trace->trigger();
#if defined OS_LINUX #if defined OS_LINUX
{ {
......
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