diff --git a/src/layui/layui/rdbMarkerBrowserPage.cc b/src/layui/layui/rdbMarkerBrowserPage.cc index 380e327e7..173f20739 100644 --- a/src/layui/layui/rdbMarkerBrowserPage.cc +++ b/src/layui/layui/rdbMarkerBrowserPage.cc @@ -367,6 +367,7 @@ public: { mp_database = db; m_waived_tag_id = mp_database ? mp_database->tags ().tag ("waived").id () : 0; + invalidate (); } @@ -1888,6 +1889,16 @@ MarkerBrowserPage::set_rdb (rdb::Database *database) rerun_button->setToolTip (QString ()); } + // mark items visited that carry the waived flag + if (mp_database) { + id_type waived_tag_id = mp_database->tags ().tag ("waived").id (); + for (auto i = mp_database->items ().begin (); i != mp_database->items ().end (); ++i) { + if (i->has_tag (waived_tag_id)) { + mp_database->set_item_visited (i.operator-> (), true); + } + } + } + QAbstractItemModel *tree_model = directory_tree->model (); MarkerBrowserTreeViewModel *new_model = new MarkerBrowserTreeViewModel ();