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