Remove filter row when closing database file

Remove the filter row in the browse tab when closing the database.
Before this it would remain visible leading to a crash when using it.
This commit is contained in:
Martin Kleusberg
2013-05-03 13:20:20 +02:00
parent 971a4051db
commit 9d8cfaa8cf

View File

@@ -279,6 +279,8 @@ void MainWindow::populateTable( const QString & tablename)
if(tablename.isEmpty())
{
ui->dataTable->setModel(0);
if(qobject_cast<FilterTableHeader*>(ui->dataTable->horizontalHeader()))
qobject_cast<FilterTableHeader*>(ui->dataTable->horizontalHeader())->generateFilters(0);
return;
}