From f08430c8125f832cd25cd9d908e0bd9ec804ae6f Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Sun, 14 Apr 2019 16:59:30 -0400 Subject: [PATCH] Add proper parent reference to the creation of DBC edit windows. This fixes an annoyance where the main window would gain focus improperly. --- dbc/dbcloadsavewindow.cpp | 2 +- dbc/dbcmaineditor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbc/dbcloadsavewindow.cpp b/dbc/dbcloadsavewindow.cpp index e4dcb5c..07f34ab 100644 --- a/dbc/dbcloadsavewindow.cpp +++ b/dbc/dbcloadsavewindow.cpp @@ -34,7 +34,7 @@ DBCLoadSaveWindow::DBCLoadSaveWindow(const QVector *frames, QWidget *p connect(ui->tableFiles, &QTableWidget::cellChanged, this, &DBCLoadSaveWindow::cellChanged); connect(ui->tableFiles, &QTableWidget::cellDoubleClicked, this, &DBCLoadSaveWindow::cellDoubleClicked); - editorWindow = new DBCMainEditor(frames); + editorWindow = new DBCMainEditor(frames, this); currentlyEditingFile = nullptr; installEventFilter(this); diff --git a/dbc/dbcmaineditor.cpp b/dbc/dbcmaineditor.cpp index 56a9899..62819e9 100644 --- a/dbc/dbcmaineditor.cpp +++ b/dbc/dbcmaineditor.cpp @@ -49,7 +49,7 @@ DBCMainEditor::DBCMainEditor( const QVector *frames, QWidget *parent) connect(ui->MessagesTable, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onCustomMenuMessage(QPoint))); ui->MessagesTable->setContextMenuPolicy(Qt::CustomContextMenu); - sigEditor = new DBCSignalEditor(); + sigEditor = new DBCSignalEditor(this); installEventFilter(this); }