diff --git a/CHANGELOG.md b/CHANGELOG.md index f491d206..9f4b09b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -94,6 +94,13 @@ setting when opened from the Layout preferences page. [[#909](https://github.com/reupen/columns_ui/pull/909)] +- Item properties now updates when a component indicates a custom title + formatting field has changed. + [[#912](https://github.com/reupen/columns_ui/pull/912)] + + (Although Item properties doesn’t use title formatting, this change makes the + panel update when things like playback statistics change.) + - A bug where dynamic internet radio artwork may not have been immediately shown after changing the ‘Displayed track’ in the Artwork view panel was fixed. [[#854](https://github.com/reupen/columns_ui/pull/854)] diff --git a/foo_ui_columns/item_properties.cpp b/foo_ui_columns/item_properties.cpp index 38eedd22..55b5cfce 100644 --- a/foo_ui_columns/item_properties.cpp +++ b/foo_ui_columns/item_properties.cpp @@ -616,16 +616,11 @@ void ItemProperties::on_playback_stop(play_control::t_stop_reason p_reason) void ItemProperties::on_changed_sorted(metadb_handle_list_cref p_items_sorted, bool p_fromhook) { - if (!p_fromhook) { - bool b_refresh = false; - size_t count = m_handles.get_count(); - for (size_t i = 0; i < count && !b_refresh; i++) { - size_t index = pfc_infinite; - if (p_items_sorted.bsearch_t(pfc::compare_t, m_handles[i], index)) - b_refresh = true; - } - if (b_refresh) { + for (auto&& track : m_handles) { + if (size_t index{}; + p_items_sorted.bsearch_t(pfc::compare_t, track, index)) { refresh_contents(); + break; } } }