Commit 45213c5d authored by Lukas Durfina's avatar Lukas Durfina Committed by Jean-Baptiste Kempf

playlist startup sorting fix

playlist startup sorting fix
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f3bd0250
...@@ -715,6 +715,16 @@ void PLModel::sort( int column, Qt::SortOrder order ) ...@@ -715,6 +715,16 @@ void PLModel::sort( int column, Qt::SortOrder order )
int i_index = -1; int i_index = -1;
int i_flag = 0; int i_flag = 0;
// FIXME: Disable sorting on startup by ignoring
// first call of sorting caused by showing dialog
// see: standardpanel.cpp:65
static bool b_first_time = true;
if( b_first_time )
{
b_first_time = false;
return;
}
#define CHECK_COLUMN( meta ) \ #define CHECK_COLUMN( meta ) \
{ \ { \
if( ( shownFlags() & meta ) ) \ if( ( shownFlags() & meta ) ) \
......
...@@ -63,8 +63,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -63,8 +63,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Create and configure the QTreeView */ /* Create and configure the QTreeView */
view = new QVLCTreeView( 0 ); view = new QVLCTreeView( 0 );
view->setSortingEnabled( true ); view->setSortingEnabled( true );
view->sortByColumn( -1, Qt::AscendingOrder ); view->sortByColumn( 0 , Qt::AscendingOrder );
view->setModel(model); view->setModel( model );
view->setIconSize( QSize( 20, 20 ) ); view->setIconSize( QSize( 20, 20 ) );
view->setAlternatingRowColors( true ); view->setAlternatingRowColors( true );
view->setAnimated( true ); view->setAnimated( true );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment