Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tools/cabana/mainwin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,19 @@ void MainWindow::loadFromClipboard(SourceSet s, bool close_all) {
}

void MainWindow::openStream(AbstractStream *stream, const QString &dbc_file) {
if (can) {
QObject::connect(can, &QObject::destroyed, this, [=]() { startStream(stream, dbc_file); });
can->deleteLater();
} else {
startStream(stream, dbc_file);
}
}

void MainWindow::startStream(AbstractStream *stream, QString dbc_file) {
center_widget->clear();
delete messages_widget;
delete video_splitter;

delete can;
can = stream;
can->setParent(this); // take ownership
can->start();
Expand Down
1 change: 1 addition & 0 deletions tools/cabana/mainwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public slots:
void updateProgressBar(uint64_t cur, uint64_t total, bool success);

protected:
void startStream(AbstractStream *stream, QString dbc_file);
bool eventFilter(QObject *obj, QEvent *event) override;
void remindSaveChanges();
void closeFile(SourceSet s = SOURCE_ALL);
Expand Down
2 changes: 1 addition & 1 deletion tools/replay/replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ void Replay::setupSegmentManager(bool has_filters) {
}

Replay::~Replay() {
seg_mgr_.reset();
if (stream_thread_.joinable()) {
rInfo("shutdown: in progress...");
interruptStream([this]() {
Expand All @@ -74,6 +73,7 @@ Replay::~Replay() {
rInfo("shutdown: done");
}
camera_server_.reset();
seg_mgr_.reset();
}

bool Replay::load() {
Expand Down