if (device_)
device_->close();
+ device_.reset();
+
+ // Remove all traces
+ signals_.clear();
+ decode_traces_.clear();
+ signals_changed();
+
device_ = std::move(device);
device_->open();
device_->session()->add_datafeed_callback([=]
data_feed_in(device, packet);
});
- decode_traces_.clear();
-
update_signals();
device_selected();
}
if (iter != cur_analog_segments_.end())
segment = (*iter).second;
else {
- // If no segment was found, this means we havn't
+ // If no segment was found, this means we haven't
// created one yet. i.e. this is the first packet
// in the sweep containing this segment.
sweep_beginning = true;