connect(view_, SIGNAL(always_zoom_to_fit_changed(bool)),
this, SLOT(on_always_zoom_to_fit_changed(bool)));
+ connect(view_, SIGNAL(cursor_state_changed(bool)),
+ this, SLOT(on_cursor_state_changed(bool)));
+
if (add_default_widgets)
add_toolbar_widgets();
}
void StandardBar::on_actionViewShowCursors_triggered()
{
- const bool show = !view_->cursors_shown();
+ const bool show = action_view_show_cursors_->isChecked();
+
if (show)
view_->centre_cursors();
}
}
+void StandardBar::on_cursor_state_changed(bool show)
+{
+ action_view_show_cursors_->setChecked(show);
+}
+
} // namespace trace
} // namespace views
} // namespace pv