[vlc-commits] [Git][videolan/vlc][master] qt/mlbookmarkmodel: Keep the current value when editing

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jun 2 09:02:57 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
1460dde1 by Benjamin Arnaud at 2022-06-02T08:40:35+00:00
qt/mlbookmarkmodel: Keep the current value when editing

fix #26980

- - - - -


1 changed file:

- modules/gui/qt/medialibrary/mlbookmarkmodel.cpp


Changes:

=====================================
modules/gui/qt/medialibrary/mlbookmarkmodel.cpp
=====================================
@@ -105,7 +105,9 @@ QVariant MLBookmarkModel::data( const QModelIndex &index, int role ) const
     }
 
     const auto& bookmark = m_bookmarks->p_items[index.row()];
-    if ( role != Qt::DisplayRole )
+
+    // NOTE: We want to keep the current value when editing.
+    if ( role != Qt::DisplayRole && role != Qt::EditRole )
         return QVariant{};
 
     switch ( index.column() )



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1460dde11478212021e03a0a669de50c3289c48f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1460dde11478212021e03a0a669de50c3289c48f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list