Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index f6e1816..7231bfb 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -278,9 +278,8 @@ QString PIconView::nextFileName(bool &isDir)const if ( !_it ) return QString::null; IconViewItem* it = static_cast<IconViewItem*>( _it ); isDir = it->isDir(); - m_view->setCurrentItem(_it); return it->path(); } QString PIconView::prevFileName(bool &isDir)const{ @@ -292,9 +291,8 @@ QString PIconView::prevFileName(bool &isDir)const{ if ( !_it ) return QString::null; IconViewItem* it = static_cast<IconViewItem*>( _it ); isDir = it->isDir(); - m_view->setCurrentItem(_it); return it->path(); } void PIconView::slotTrash() { @@ -478,20 +476,23 @@ void PIconView::slotEnd() { void PIconView::slotShowNext() { bool isDir = false; QString name = nextFileName(isDir); - if (isDir) return; if (name.isEmpty()) return; - odebug << "Show next: " << name << oendl; + if (isDir) return; + /* if we got a name we have a next item */ + m_view->setCurrentItem(m_view->currentItem()->nextItem()); slotShowImage(name); } void PIconView::slotShowPrev() { bool isDir = false; QString name = prevFileName(isDir); - if (isDir) return; if (name.isEmpty()) return; + if (isDir) return; + /* if we got a name we have a prev item */ + m_view->setCurrentItem(m_view->currentItem()->prevItem()); slotShowImage(name); } void PIconView::slotShowImage() |