From 7a28f1931d3e19b7a7094fb8ec48a8bf98847875 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Sat, 14 Jan 2012 23:13:55 +0200 Subject: [PATCH] Qt4: don't sort listview of model allready has items For example when starting with files, keep commanline order. Fixes #5207 --- modules/gui/qt4/components/playlist/standardpanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp index 285168e5bd..a385d7180e 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 { -- GitLab