projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
faecaa1
)
Show the file-device in the selector when a file is loaded
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 26 Feb 2014 21:31:39 +0000
(22:31 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 1 Mar 2014 11:15:02 +0000
(11:15 +0000)
pv/mainwindow.cpp
patch
|
blob
|
history
diff --git
a/pv/mainwindow.cpp
b/pv/mainwindow.cpp
index 2a74d5b292a40f8ac6ecaf42ba1dbdc791eef7a5..c75b3a9e59a5e940cbb2da11168c98e577be2b7d 100644
(file)
--- 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));
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)
_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);
}
show_session_error(tr("Failed to load ") + file_name, e);
}
+ update_device_list();
+
_session.start_capture(boost::bind(&MainWindow::session_error, this,
errorMessage, infoMessage));
}
_session.start_capture(boost::bind(&MainWindow::session_error, this,
errorMessage, infoMessage));
}