Fix Show Rowid menu item

This took me way too long to fix but it feels good that it's working
now.

See issue #408.
This commit is contained in:
Martin Kleusberg
2015-12-22 22:42:00 +01:00
parent 00ee9b8da4
commit 84cd516bdf

View File

@@ -2360,9 +2360,8 @@ void MainWindow::editDataColumnDisplayFormat()
void MainWindow::showRowidColumn(bool show)
{
// FIXME: Workaround for actually getting the next line to work reliably
//ui->dataTable->setModel(0);
//ui->dataTable->setModel(m_browseTableModel);
// Block all signals from the horizontal header. Otherwise the QHeaderView::sectionResized signal causes us trouble
ui->dataTable->horizontalHeader()->blockSignals(true);
// Show/hide rowid column
ui->dataTable->setColumnHidden(0, !show);
@@ -2376,6 +2375,9 @@ void MainWindow::showRowidColumn(bool show)
// Update the filter row
qobject_cast<FilterTableHeader*>(ui->dataTable->horizontalHeader())->generateFilters(m_browseTableModel->columnCount(), show);
// Re-enable signals
ui->dataTable->horizontalHeader()->blockSignals(false);
}
void MainWindow::browseDataSetTableEncoding(bool forAllTables)