]> sigrok.org Git - pulseview.git/blobdiff - pv/toolbars/mainbar.cpp
MainBar: Only show "total sampling time" tooltip if supported by device.
[pulseview.git] / pv / toolbars / mainbar.cpp
index 3b1698669a9ac8634a8af1ce87a7786f02cd6833..06d4f409b718a77e9546d076d7ebe7b496d6debf 100644 (file)
@@ -112,6 +112,7 @@ MainBar::MainBar(Session &session, MainWindow &main_window) :
 
        vector<QAction *> open_actions;
        open_actions.push_back(main_window.action_save_as());
+       open_actions.push_back(main_window.action_save_selection_as());
 
        widgets::ExportMenu *export_menu = new widgets::ExportMenu(this,
                session.device_manager().context(),
@@ -585,7 +586,8 @@ void MainBar::on_config_changed()
 
 bool MainBar::eventFilter(QObject *watched, QEvent *event)
 {
-       if ((watched == &sample_count_ || watched == &sample_rate_) &&
+       if (sample_count_supported_ &&
+               (watched == &sample_count_ || watched == &sample_rate_) &&
                (event->type() == QEvent::ToolTip)) {
                auto sec = pv::util::Timestamp(sample_count_.value()) / sample_rate_.value();
                QHelpEvent *help_event = static_cast<QHelpEvent*>(event);