-rw-r--r-- | noncore/multimedia/opieplayer2/playlistselection.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistselection.h b/noncore/multimedia/opieplayer2/playlistselection.h index d10bc82..9cc4e30 100644 --- a/noncore/multimedia/opieplayer2/playlistselection.h +++ b/noncore/multimedia/opieplayer2/playlistselection.h | |||
@@ -47,2 +47,4 @@ public slots: | |||
47 | 47 | ||
48 | bool isEmpty() const { return childCount() == 0; } | ||
49 | |||
48 | protected: | 50 | protected: |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index f53def6..b08204e 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -420,3 +420,9 @@ const DocLnk *PlayListWidget::current() const { // this is fugly | |||
420 | 420 | ||
421 | return d->selectedFiles->current(); | 421 | const DocLnk *lnk = d->selectedFiles->current(); |
422 | if ( !lnk ) { | ||
423 | d->selectedFiles->first(); | ||
424 | lnk = d->selectedFiles->current(); | ||
425 | } | ||
426 | assert( lnk ); | ||
427 | return lnk; | ||
422 | } | 428 | } |
@@ -566,2 +572,4 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
566 | d->tbAddToList->setEnabled(FALSE); | 572 | d->tbAddToList->setEnabled(FALSE); |
573 | |||
574 | d->tbPlay->setEnabled( !d->selectedFiles->isEmpty() ); | ||
567 | } | 575 | } |