[vlc-commits] Qt4: don't sort listview of model allready has items

Ilkka Ollakka git at videolan.org
Sun Jan 15 18:58:00 CET 2012


vlc/vlc-1.2 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Jan 14 23:13:55 2012 +0200| [fa7a70499c9f3d01940e4a1778d9fb5a849f2f32] | committer: Jean-Baptiste Kempf

Qt4: don't sort listview of model allready has items

For example when starting with files, keep commanline order.
Fixes #5207
(cherry picked from commit 7a28f1931d3e19b7a7094fb8ec48a8bf98847875)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=fa7a70499c9f3d01940e4a1778d9fb5a849f2f32
---

 .../gui/qt4/components/playlist/standardpanel.cpp  |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index db7f780..9a121b7 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -394,6 +394,12 @@ void StandardPLPanel::showView( int i_view )
         {
             treeView->header()->restoreState(getSettings()
                     ->value( "Playlist/headerStateV2" ).toByteArray() );
+            /* if there is allready stuff in playlist, we don't sort it and we reset
+               sorting */
+            if( model->rowCount() )
+            {
+                treeView->header()->setSortIndicator( -1 , Qt::AscendingOrder );
+            }
         }
         else
         {



More information about the vlc-commits mailing list