From: Joel Holdsworth Date: Wed, 26 Feb 2014 21:31:39 +0000 (+0100) Subject: Show the file-device in the selector when a file is loaded X-Git-Tag: pulseview-0.2.0~47 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a5ea63c219065d019195171f3c7694ee0123d5ed;p=pulseview.git Show the file-device in the selector when a file is loaded --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 2a74d5b2..c75b3a9e 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -296,6 +296,10 @@ void MainWindow::update_device_list() std::copy(_device_manager.devices().begin(), _device_manager.devices().end(), std::back_inserter(devices)); + if (std::find(devices.begin(), devices.end(), selected_device) == + devices.end()) + devices.push_back(selected_device); + _sampling_bar->set_device_list(devices); if (selected_device) @@ -314,6 +318,8 @@ void MainWindow::load_file(QString file_name) show_session_error(tr("Failed to load ") + file_name, e); } + update_device_list(); + _session.start_capture(boost::bind(&MainWindow::session_error, this, errorMessage, infoMessage)); }