Changeset 9f666f7c95ba3394c5dcbf146ddb5a7967e400ff
- 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
| r7b64c06 |
r9f666f7 |
|
| 145 | 145 | { |
|---|
| 146 | 146 | QModelIndex parent; |
|---|
| 147 | | view->scrollTo( index, QAbstractItemView::EnsureVisible ); |
|---|
| 148 | 147 | if( model->isCurrent( index ) ) |
|---|
| 149 | 148 | { |
|---|
| | 149 | view->scrollTo( index, QAbstractItemView::EnsureVisible ); |
|---|
| 150 | 150 | parent = index; |
|---|
| 151 | 151 | while( parent.isValid() ) |
|---|
| rba7b7a8 |
r9f666f7 |
|
| 80 | 80 | i_showflags = config_GetInt( model->p_intf , "qt-pl-showflags" ); |
|---|
| 81 | 81 | updateview(); |
|---|
| | 82 | } else { |
|---|
| | 83 | i_showflags = parentItem->i_showflags; |
|---|
| | 84 | //Add empty string and update() handles data appending |
|---|
| | 85 | strings.append( qtr("") ); |
|---|
| 82 | 86 | } |
|---|
| 83 | 87 | } |
|---|
| … | … | |
| 86 | 90 | { |
|---|
| 87 | 91 | strings.clear(); |
|---|
| | 92 | |
|---|
| | 93 | if( model->i_depth == 1 ) //left window for playlist etc. |
|---|
| | 94 | { |
|---|
| | 95 | strings.append( qtr("") ); |
|---|
| | 96 | return; |
|---|
| | 97 | } |
|---|
| 88 | 98 | |
|---|
| 89 | 99 | for( int i_index=1; i_index <= VLC_META_ENGINE_MB_TRM_ID; i_index = i_index*2 ) |
|---|
| … | … | |
| 171 | 181 | char psz_duration[MSTRTIME_MAX_SIZE]; |
|---|
| 172 | 182 | assert( p_item->p_input->i_id == i_input_id ); |
|---|
| 173 | | strings.clear(); |
|---|
| 174 | 183 | |
|---|
| 175 | 184 | type = p_item->p_input->i_type; |
|---|
| … | … | |
| 183 | 192 | model->removeArt(); |
|---|
| 184 | 193 | |
|---|
| | 194 | strings.clear(); |
|---|
| | 195 | |
|---|
| 185 | 196 | if( model->i_depth == 1 ) //left window for playlist etc. |
|---|
| 186 | 197 | { |
|---|
| … | … | |
| 210 | 221 | ADD_META( p_item->p_input->p_meta->psz_title ); |
|---|
| 211 | 222 | } else { |
|---|
| 212 | | ADD_META( p_item->p_input->psz_name ); |
|---|
| | 223 | strings.append( qfu( p_item->p_input->psz_name ) ); |
|---|
| 213 | 224 | } |
|---|
| 214 | 225 | break; |
|---|
| … | … | |
| 544 | 555 | int PLModel::columnCount( const QModelIndex &i) const |
|---|
| 545 | 556 | { |
|---|
| 546 | | if( i_depth == 1 ) return 1; |
|---|
| 547 | 557 | return rootItem->strings.count(); |
|---|
| 548 | 558 | } |
|---|