Diffstat (limited to 'noncore/multimedia/opieplayer3/playlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer3/playlist.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer3/playlist.cpp b/noncore/multimedia/opieplayer3/playlist.cpp index 2eb40e3..6f2e668 100644 --- a/noncore/multimedia/opieplayer3/playlist.cpp +++ b/noncore/multimedia/opieplayer3/playlist.cpp | |||
@@ -161,12 +161,14 @@ void PlaylistView::addFile(const QString&aFile,const QString&aName) | |||
161 | break; | 161 | break; |
162 | } | 162 | } |
163 | QMessageBox::warning(0,tr("Error reading fileheader"),msg); | 163 | QMessageBox::warning(0,tr("Error reading fileheader"),msg); |
164 | return; | 164 | return; |
165 | } | 165 | } |
166 | m_lastItem = m_items.last(); | 166 | m_lastItem = m_items.last(); |
167 | PlaylistItem*_it = currentItem(); | ||
168 | |||
167 | if (m_lastItem) { | 169 | if (m_lastItem) { |
168 | m_lastItem = new PlaylistItem(aFile,this,m_lastItem); | 170 | m_lastItem = new PlaylistItem(aFile,this,m_lastItem); |
169 | } else { | 171 | } else { |
170 | m_lastItem = new PlaylistItem(aFile,this); | 172 | m_lastItem = new PlaylistItem(aFile,this); |
171 | } | 173 | } |
172 | m_lastItem->setExpandable(false); | 174 | m_lastItem->setExpandable(false); |
@@ -196,14 +198,16 @@ void PlaylistView::addFile(const QString&aFile,const QString&aName) | |||
196 | codec.sprintf("%02i:%02i m",m,l); | 198 | codec.sprintf("%02i:%02i m",m,l); |
197 | } | 199 | } |
198 | // time | 200 | // time |
199 | m_lastItem->setText(COL_TIME,codec); | 201 | m_lastItem->setText(COL_TIME,codec); |
200 | m_lastItem->Video(m_Infolib->hasVideo()); | 202 | m_lastItem->Video(m_Infolib->hasVideo()); |
201 | m_items.append(m_lastItem); | 203 | m_items.append(m_lastItem); |
204 | if (_it==NULL) { | ||
202 | setSelected(m_lastItem,true); | 205 | setSelected(m_lastItem,true); |
203 | } | 206 | } |
207 | } | ||
204 | 208 | ||
205 | void PlaylistView::slotAppendDir() | 209 | void PlaylistView::slotAppendDir() |
206 | { | 210 | { |
207 | QString _dir = Opie::Ui::OFileDialog::getDirectory(Opie::Ui::OFileSelector::Extended,m_lastDir,0,m_lastDir); | 211 | QString _dir = Opie::Ui::OFileDialog::getDirectory(Opie::Ui::OFileSelector::Extended,m_lastDir,0,m_lastDir); |
208 | if (_dir.isEmpty()) return; | 212 | if (_dir.isEmpty()) return; |
209 | m_lastDir = _dir; | 213 | m_lastDir = _dir; |