filters: don't clear filters on refresh

This commit is contained in:
Peinthor Rene
2014-09-19 18:27:40 +02:00
parent 0031c0723f
commit 57d086fbf2
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ public:
virtual QSize sizeHint() const;
public slots:
void generateFilters(int number);
void generateFilters(int number, bool bKeepValues = false);
void adjustPositions();
signals:
+3 -3
View File
@@ -293,7 +293,7 @@ void MainWindow::populateStructure()
}
}
void MainWindow::populateTable( const QString & tablename)
void MainWindow::populateTable(const QString & tablename, bool bKeepFilter)
{
// Remove the model-view link if the table name is empty in order to remove any data from the view
if(tablename.isEmpty())
@@ -333,7 +333,7 @@ void MainWindow::populateTable( const QString & tablename)
ui->dataTable->filterHeader()->setSortIndicator(curBrowseOrderByIndex, curBrowseOrderByMode);
// Update the filter row
qobject_cast<FilterTableHeader*>(ui->dataTable->horizontalHeader())->generateFilters(m_browseTableModel->columnCount());
qobject_cast<FilterTableHeader*>(ui->dataTable->horizontalHeader())->generateFilters(m_browseTableModel->columnCount(), bKeepFilter);
// Activate the add and delete record buttons and editing only if a table has been selected
bool is_table = db.getObjectByName(tablename).gettype() == "table";
@@ -533,7 +533,7 @@ void MainWindow::setRecordsetLabel()
void MainWindow::browseRefresh()
{
populateTable(ui->comboBrowseTable->currentText());
populateTable(ui->comboBrowseTable->currentText(), true);
}
void MainWindow::createTable()
+1 -1
View File
@@ -122,7 +122,7 @@ private slots:
void changeTreeSelection();
void fileNew();
void populateStructure();
void populateTable(const QString& tablename);
void populateTable(const QString& tablename, bool bKeepFilter = false);
void resetBrowser();
void fileClose();
void addRecord();