Changeset 9f666f7c95ba3394c5dcbf146ddb5a7967e400ff

Show
Ignore:
Timestamp:
08/07/07 19:57:46 (1 year ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1186509466 +0000
git-parent:

[f0cf58a8d9fddd9feaa65d15adf918417d275b22]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1186509466 +0000
Message:

Qt4 - Playlist: scrollTo current-item and view issues...
Patch by Ilkka Ollakka

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/components/playlist/standardpanel.cpp

    r7b64c06 r9f666f7  
    145145{ 
    146146    QModelIndex parent; 
    147     view->scrollTo( index, QAbstractItemView::EnsureVisible ); 
    148147    if( model->isCurrent( index ) ) 
    149148    { 
     149        view->scrollTo( index, QAbstractItemView::EnsureVisible ); 
    150150        parent = index; 
    151151        while( parent.isValid() ) 
  • modules/gui/qt4/playlist_model.cpp

    rba7b7a8 r9f666f7  
    8080        i_showflags = config_GetInt( model->p_intf , "qt-pl-showflags" ); 
    8181        updateview(); 
     82    } else { 
     83        i_showflags = parentItem->i_showflags; 
     84        //Add empty string and update() handles data appending 
     85        strings.append( qtr("") );  
    8286    } 
    8387} 
     
    8690{ 
    8791    strings.clear(); 
     92 
     93    if( model->i_depth == 1 )  //left window for playlist etc. 
     94    { 
     95        strings.append( qtr("") );    
     96        return; 
     97    } 
    8898 
    8999    for( int i_index=1; i_index <= VLC_META_ENGINE_MB_TRM_ID; i_index = i_index*2 ) 
     
    171181    char psz_duration[MSTRTIME_MAX_SIZE]; 
    172182    assert( p_item->p_input->i_id == i_input_id ); 
    173     strings.clear(); 
    174183 
    175184    type = p_item->p_input->i_type; 
     
    183192        model->removeArt(); 
    184193 
     194    strings.clear(); 
     195 
    185196    if( model->i_depth == 1 )  //left window for playlist etc. 
    186197    { 
     
    210221                        ADD_META( p_item->p_input->p_meta->psz_title ); 
    211222                    } else { 
    212                         ADD_META( p_item->p_input->psz_name ); 
     223                        strings.append( qfu( p_item->p_input->psz_name ) ); 
    213224                    } 
    214225                    break; 
     
    544555int PLModel::columnCount( const QModelIndex &i) const 
    545556{ 
    546     if( i_depth == 1 ) return 1; 
    547557    return rootItem->strings.count(); 
    548558}