projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #605 by closing current device when another is selected
[pulseview.git]
/
pv
/
devices
/
inputfile.cpp
diff --git
a/pv/devices/inputfile.cpp
b/pv/devices/inputfile.cpp
index e92bf208bf17989039bed7b4dbbbbe277f49093f..13af3db9cd85c791935da6c80bf1a14220d492a0 100644
(file)
--- a/
pv/devices/inputfile.cpp
+++ b/
pv/devices/inputfile.cpp
@@
-42,10
+42,18
@@
InputFile::InputFile(const std::shared_ptr<sigrok::Context> &context,
throw QString("Failed to create input");
}
throw QString("Failed to create input");
}
-void InputFile::create() {
+void InputFile::open() {
+ if (session_)
+ close();
+
session_ = context_->create_session();
}
session_ = context_->create_session();
}
+void InputFile::close() {
+ if (session_)
+ session_->remove_devices();
+}
+
void InputFile::start() {
}
void InputFile::start() {
}