From: Soeren Apel Date: Tue, 5 Nov 2019 21:25:50 +0000 (+0100) Subject: Fix #1400 by matching decoder selectors only for current session X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ac91f7ad5b49267a072f83fcacfe3a695d37cd7c;p=pulseview.git Fix #1400 by matching decoder selectors only for current session --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index db6db406..e79b0459 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -870,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;