[vlc-commits] qt medialib: reset history model on history changed
    Pierre Lamot 
    git at videolan.org
       
    Mon Jan  4 12:40:41 UTC 2021
    
    
  
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Dec 17 15:30:46 2020 +0100| [d558c39cdd9c1f44b1c772ba9be5b577952d3397] | committer: Pierre Lamot
qt medialib: reset history model on history changed
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d558c39cdd9c1f44b1c772ba9be5b577952d3397
---
 modules/gui/qt/medialibrary/mlrecentsmodel.cpp      | 3 +++
 modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp | 3 +++
 2 files changed, 6 insertions(+)
diff --git a/modules/gui/qt/medialibrary/mlrecentsmodel.cpp b/modules/gui/qt/medialibrary/mlrecentsmodel.cpp
index e4c675ce34..70acacc260 100644
--- a/modules/gui/qt/medialibrary/mlrecentsmodel.cpp
+++ b/modules/gui/qt/medialibrary/mlrecentsmodel.cpp
@@ -78,6 +78,9 @@ void MLRecentsModel::onVlcMlEvent( const MLEvent &event )
 {
     switch ( event.i_type )
     {
+        case VLC_ML_EVENT_HISTORY_CHANGED:
+            emit resetRequested();
+            break;
         case VLC_ML_EVENT_MEDIA_ADDED:
         case VLC_ML_EVENT_MEDIA_UPDATED:
         case VLC_ML_EVENT_MEDIA_DELETED:
diff --git a/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp b/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp
index 2085a68d18..f27bb82af2 100644
--- a/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp
+++ b/modules/gui/qt/medialibrary/mlrecentsvideomodel.cpp
@@ -96,6 +96,9 @@ void MLRecentsVideoModel::onVlcMlEvent( const MLEvent &event )
 {
     switch ( event.i_type )
     {
+        case VLC_ML_EVENT_HISTORY_CHANGED:
+            emit resetRequested();
+            break;
         case VLC_ML_EVENT_MEDIA_ADDED:
         case VLC_ML_EVENT_MEDIA_UPDATED:
         case VLC_ML_EVENT_MEDIA_DELETED:
    
    
More information about the vlc-commits
mailing list