From b3d30cad4bbfa0d4a9d7930631c2bf995f6b0036 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 22 Jan 2021 14:56:26 +0100 Subject: [PATCH] Enable buttons for editing/deleting tables and similar on first click When opening a database and clicking on a table in the Database Structure tab, the buttons for modifying or deleting the table were still disabled. Only on the second click activated the buttons correctly. See issue #2528. --- src/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 4b0820a5..4d5ef83c 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -430,7 +430,7 @@ void MainWindow::init() connect(editDock, &EditDialog::recordTextUpdated, this, &MainWindow::updateRecordText); connect(editDock, &EditDialog::evaluateText, this, &MainWindow::evaluateText); connect(editDock, &EditDialog::requestUrlOrFileOpen, this, &MainWindow::openUrlOrFile); - connect(ui->dbTreeWidget->selectionModel(), &QItemSelectionModel::currentChanged, this, &MainWindow::changeTreeSelection); + connect(ui->dbTreeWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, &MainWindow::changeTreeSelection); connect(ui->dockEdit, &QDockWidget::visibilityChanged, this, &MainWindow::toggleEditDock); connect(remoteDock, SIGNAL(openFile(QString)), this, SLOT(fileOpen(QString))); connect(ui->actionDropQualifiedCheck, &QAction::toggled, dbStructureModel, &DbStructureModel::setDropQualifiedNames);