Commit 0a3a03ee authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

fixed filter update in historical view

parent 7e07c6f8
...@@ -384,7 +384,7 @@ void Alarm::queryDB() ...@@ -384,7 +384,7 @@ void Alarm::queryDB()
printf("executing query \"%s\"\n", qstoc(query)); printf("executing query \"%s\"\n", qstoc(query));
m_filter->filter(); m_filter->filter(true);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
......
...@@ -39,14 +39,14 @@ public: ...@@ -39,14 +39,14 @@ public:
changed = true; changed = true;
} }
void filter(); void filter(bool force = false);
QMap<int, QString> fmap; // filter map QMap<int, QString> fmap; // filter map
QTreeView *m_v; QTreeView *m_v;
}; };
inline void AlarmFilter::filter() { inline void AlarmFilter::filter(bool force) {
if(changed) { if(changed || force) {
changed = false; changed = false;
QAbstractItemModel *m = m_v->model(); QAbstractItemModel *m = m_v->model();
for(int i = 0; i < m->rowCount(); i++) { for(int i = 0; i < m->rowCount(); i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment