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

Ilkka Ollakka git at videolan.org
Sun Jan 15 16:59:48 CET 2012


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Jan 14 23:13:55 2012 +0200| [7a28f1931d3e19b7a7094fb8ec48a8bf98847875] | committer: Ilkka Ollakka

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

For example when starting with files, keep commanline order.
Fixes #5207

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

 .../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 285168e..a385d71 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -392,6 +392,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