[vlc-devel] [PATCH 15/27] qt: fix broken duration calculation after items are removed from playlist

Fatih Uzunoglu fuzun54 at outlook.com
Fri Oct 9 18:56:36 CEST 2020


---
 modules/gui/qt/playlist/playlist_model.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/playlist/playlist_model.cpp b/modules/gui/qt/playlist/playlist_model.cpp
index 65b49554ee..ac793bd839 100644
--- a/modules/gui/qt/playlist/playlist_model.cpp
+++ b/modules/gui/qt/playlist/playlist_model.cpp
@@ -235,7 +235,7 @@ void PlaylistListModelPrivate::onItemsRemoved(size_t index, size_t count)
 {
     Q_Q(PlaylistListModel);
 
-    for(size_t i = index; i < count; ++i)
+    for(size_t i = index; i <= index + count - 1; ++i)
     {
         m_duration -= m_items.at(i).getDuration();
     }
-- 
2.25.1



More information about the vlc-devel mailing list