aboutsummaryrefslogtreecommitdiff
path: root/src/Body.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Body.cpp')
-rw-r--r--src/Body.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 2df514b..ba99c62 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -285,6 +285,20 @@ namespace QuickMedia {
//page_scroll = 0.0f;
}
+ void Body::set_selected_item(BodyItem *body_item) {
+ if(!body_item)
+ return;
+
+ for(size_t i = 0; i < items.size(); ++i) {
+ if(items[i].get() == body_item) {
+ selected_item = i;
+ break;
+ }
+ }
+
+ clamp_selection();
+ }
+
void Body::reset_prev_selected_item() {
prev_selected_item = selected_item;
}
@@ -1605,6 +1619,7 @@ namespace QuickMedia {
void Body::filter_search_fuzzy(const std::string &text) {
current_filter = text;
+ items_dirty = DirtyState::FALSE;
if(text.empty()) {
for(auto &item : items) {