From 9d8cfaa8cfe7901fd2ef8d379db4d70c4d60e0d4 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 3 May 2013 13:20:20 +0200 Subject: [PATCH] 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. --- src/MainWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 6a6ec113..376844fe 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -279,6 +279,8 @@ void MainWindow::populateTable( const QString & tablename) if(tablename.isEmpty()) { ui->dataTable->setModel(0); + if(qobject_cast(ui->dataTable->horizontalHeader())) + qobject_cast(ui->dataTable->horizontalHeader())->generateFilters(0); return; }