From 80e4708fc21b3c606cc7c46be81cdda28b44f12c Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Sat, 16 Mar 2013 19:35:27 +0100 Subject: [PATCH] Fix selection of entire columns in browse tab Fix the selection of entire columns in the browse tab table view. Even when selecting multiple columns the data would be re-sorted instead of selected; this is changed now. --- src/MainWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c137f0de..766bada8 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1129,6 +1129,10 @@ void MainWindow::activateFields(bool enable) void MainWindow::browseTableHeaderClicked(int logicalindex) { + // Abort if there is more than one column selected because this tells us that the user pretty sure wants to do a range selection instead of sorting data + if(ui->dataTable->selectionModel()->selectedColumns().count() > 1) + return; + // instead of the column name we just use the column index, +2 because 'rowid, *' is the projection curBrowseOrderByIndex = logicalindex + 2; curBrowseOrderByMode = curBrowseOrderByMode == ORDERMODE_ASC ? ORDERMODE_DESC : ORDERMODE_ASC;