X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=e79b045945c1b255c18826ce9ee77723adfbd949;hb=c409988b235a55772537ef92e1a231bb0a75fa6e;hp=e33901a222c1db720adf58acba7f684be122d142;hpb=ccf6a266d9b911075512b4de16fe2ce2c2e767c4;p=pulseview.git diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index e33901a2..e79b0459 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -514,9 +514,13 @@ void MainWindow::setup_ui() zoom_in_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Plus), this, SLOT(on_zoom_in_shortcut_triggered())); zoom_in_shortcut_->setAutoRepeat(false); + zoom_in_shortcut_2_ = new QShortcut(QKeySequence(Qt::Key_Up), this, SLOT(on_zoom_in_shortcut_triggered())); + zoom_out_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Minus), this, SLOT(on_zoom_out_shortcut_triggered())); zoom_out_shortcut_->setAutoRepeat(false); + zoom_out_shortcut_2_ = new QShortcut(QKeySequence(Qt::Key_Down), this, SLOT(on_zoom_out_shortcut_triggered())); + home_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Home), this, SLOT(on_scroll_to_start_triggered())); home_shortcut_->setAutoRepeat(false); @@ -866,7 +870,10 @@ void MainWindow::on_show_decoder_selector(Session *session) // Close dock widget if it's already showing and return for (auto entry : sub_windows_) { QDockWidget* dock = entry.first; - if (dynamic_pointer_cast(entry.second)) { + shared_ptr decoder_selector = + dynamic_pointer_cast(entry.second); + + if (decoder_selector && (&decoder_selector->session() == session)) { sub_windows_.erase(dock); dock->close(); return;