mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user