cabana: fix multiple dialog popups (#28358)
fix multiple popups old-commit-hash: a19799cbe968a4f0633b591ff9ed27a9a3f35b61
This commit is contained in:
@@ -351,12 +351,13 @@ void MainWindow::streamStarted() {
|
||||
}
|
||||
|
||||
void MainWindow::eventsMerged() {
|
||||
if (!can->liveStreaming()) {
|
||||
auto fingerprint = can->carFingerprint();
|
||||
video_dock->setWindowTitle(tr("ROUTE: %1 FINGERPRINT: %2").arg(can->routeName()).arg(fingerprint.isEmpty() ? tr("Unknown Car") : fingerprint));
|
||||
if (!can->liveStreaming() && std::exchange(car_fingerprint, can->carFingerprint()) != car_fingerprint) {
|
||||
video_dock->setWindowTitle(tr("ROUTE: %1 FINGERPRINT: %2")
|
||||
.arg(can->routeName())
|
||||
.arg(car_fingerprint.isEmpty() ? tr("Unknown Car") : car_fingerprint));
|
||||
// Don't overwrite already loaded DBC
|
||||
if (!dbc()->msgCount() && !fingerprint.isEmpty()) {
|
||||
auto dbc_name = fingerprint_to_dbc[fingerprint];
|
||||
if (!dbc()->msgCount() && !car_fingerprint.isEmpty()) {
|
||||
auto dbc_name = fingerprint_to_dbc[car_fingerprint];
|
||||
if (dbc_name != QJsonValue::Undefined) {
|
||||
loadDBCFromOpendbc(dbc_name.toString());
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ protected:
|
||||
QAction *save_dbc = nullptr;
|
||||
QAction *save_dbc_as = nullptr;
|
||||
QAction *copy_dbc_to_clipboard = nullptr;
|
||||
QString car_fingerprint;
|
||||
int prev_undostack_index = 0;
|
||||
int prev_undostack_count = 0;
|
||||
friend class OnlineHelp;
|
||||
|
||||
Reference in New Issue
Block a user