From 39302f5b6061cf687a81984406e20070d60b4563 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 25 May 2018 23:47:47 +0200 Subject: [PATCH] Also fix rowid column being shown when changing the sort order Apply the same fix as in 189b750a009b71bc7de021647309d0b0d8c40232 for the filters for the sort order. --- src/MainWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 8187ce074..81d7f8fb5 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1640,6 +1640,10 @@ void MainWindow::browseTableHeaderClicked(int logicalindex) ui->dataTable->setCurrentIndex(ui->dataTable->currentIndex().sibling(0, logicalindex)); attachPlot(ui->dataTable, m_browseTableModel, &browseTableSettings[currentlyBrowsedTableName()]); + + // This seems to be necessary as a workaround for newer Qt versions. Otherwise the rowid column is always shown after changing the filters. + bool showRowid = browseTableSettings[currentlyBrowsedTableName()].showRowid; + ui->dataTable->setColumnHidden(0, !showRowid); } void MainWindow::resizeEvent(QResizeEvent*)