Fix hidden columns being unhidden in Browse Data tab when sorting

This is required for Qt version < 5.10. For Qt versions >= 5.10 the
unhiding of all columns before rehiding the desired ones does nothing
because there the table view doesn't store its state anymore. And when
it does nothing we don't change the state of our view settings which in
turn triggers the mentioned problem.

See issue #1475.
This commit is contained in:
Martin Kleusberg
2018-08-12 13:46:12 +02:00
parent 96ca599479
commit b219edbbfb
2 changed files with 6 additions and 2 deletions

View File

@@ -627,8 +627,12 @@ void MainWindow::populateTable()
QApplication::restoreOverrideCursor();
}
void MainWindow::applyBrowseTableSettings(const BrowseDataTableSettings& storedData, bool skipFilters)
void MainWindow::applyBrowseTableSettings(BrowseDataTableSettings storedData, bool skipFilters)
{
// We don't want to pass storedData by reference because the functions below would change the referenced data in their original
// place, thus modifiying the data this function can use. To have a static description of what the view should look like we want
// a copy here.
// Show rowid column. Needs to be done before the column widths setting because of the workaround in there and before the filter setting
// because of the filter row generation.
showRowidColumn(storedData.showRowid, skipFilters);