Commit 81ae8cec authored by Ilkka Ollakka's avatar Ilkka Ollakka

[Qt] Cleanup: Don't skip first sorting, seems that you don't need that kinda

 workaround to get items correctly ordered in playlist, just set sortingIndicator
 to right column and let playlist sort empty list when enabling sorting.

 Works for me, but please double check.
parent b3da319e
......@@ -735,16 +735,6 @@ void PLModel::sort( int column, Qt::SortOrder order )
int i_index = -1;
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;
}
int i_column = 1;
for( i_column = 1; i_column != COLUMN_END; i_column<<=1 )
{
......
......@@ -63,8 +63,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Create and configure the QTreeView */
view = new QVLCTreeView( 0 );
view->header()->setSortIndicator( 0 , Qt::AscendingOrder );
view->setSortingEnabled( true );
view->sortByColumn( 0 , Qt::AscendingOrder );
view->setModel( model );
view->setIconSize( QSize( 20, 20 ) );
view->setAlternatingRowColors( 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