Skip to content

Commit

Permalink
Fix bug in filter function when havin multiple filters
Browse files Browse the repository at this point in the history
Since commit 7073230 there has been a
bug in the SqliteTableModel::setQuery method which rendered the filters
useless when using them on multiple columns: Because this method is
called whenever a filter value is changed and because it deleted the
internal representation of the filters all filters except the one last
modified were deleted but still shown in the UI.
  • Loading branch information
MKleusberg committed Jun 12, 2014
1 parent 2b65bbc commit f1e5502
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sqlitetablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ QString removeComments(QString s)
void SqliteTableModel::setQuery(const QString& sQuery, bool dontClearHeaders)
{
// clear
m_mWhere.clear();
if(!dontClearHeaders)
{
m_mWhere.clear();
m_headers.clear();
}

if(!m_db->isOpen())
return;
Expand Down

0 comments on commit f1e5502

Please sign in to comment.