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 | |||
278 | if ( !_it ) | 278 | if ( !_it ) |
279 | return QString::null; | 279 | return QString::null; |
280 | IconViewItem* it = static_cast<IconViewItem*>( _it ); | 280 | IconViewItem* it = static_cast<IconViewItem*>( _it ); |
281 | isDir = it->isDir(); | 281 | isDir = it->isDir(); |
282 | m_view->setCurrentItem(_it); | ||
283 | return it->path(); | 282 | return it->path(); |
284 | } | 283 | } |
285 | 284 | ||
286 | QString PIconView::prevFileName(bool &isDir)const{ | 285 | QString PIconView::prevFileName(bool &isDir)const{ |
@@ -292,9 +291,8 @@ QString PIconView::prevFileName(bool &isDir)const{ | |||
292 | if ( !_it ) | 291 | if ( !_it ) |
293 | return QString::null; | 292 | return QString::null; |
294 | IconViewItem* it = static_cast<IconViewItem*>( _it ); | 293 | IconViewItem* it = static_cast<IconViewItem*>( _it ); |
295 | isDir = it->isDir(); | 294 | isDir = it->isDir(); |
296 | m_view->setCurrentItem(_it); | ||
297 | return it->path(); | 295 | return it->path(); |
298 | } | 296 | } |
299 | 297 | ||
300 | void PIconView::slotTrash() { | 298 | void PIconView::slotTrash() { |
@@ -478,20 +476,23 @@ void PIconView::slotEnd() { | |||
478 | void PIconView::slotShowNext() | 476 | void PIconView::slotShowNext() |
479 | { | 477 | { |
480 | bool isDir = false; | 478 | bool isDir = false; |
481 | QString name = nextFileName(isDir); | 479 | QString name = nextFileName(isDir); |
482 | if (isDir) return; | ||
483 | if (name.isEmpty()) return; | 480 | if (name.isEmpty()) return; |
484 | odebug << "Show next: " << name << oendl; | 481 | if (isDir) return; |
482 | /* if we got a name we have a next item */ | ||
483 | m_view->setCurrentItem(m_view->currentItem()->nextItem()); | ||
485 | slotShowImage(name); | 484 | slotShowImage(name); |
486 | } | 485 | } |
487 | 486 | ||
488 | void PIconView::slotShowPrev() | 487 | void PIconView::slotShowPrev() |
489 | { | 488 | { |
490 | bool isDir = false; | 489 | bool isDir = false; |
491 | QString name = prevFileName(isDir); | 490 | QString name = prevFileName(isDir); |
492 | if (isDir) return; | ||
493 | if (name.isEmpty()) return; | 491 | if (name.isEmpty()) return; |
492 | if (isDir) return; | ||
493 | /* if we got a name we have a prev item */ | ||
494 | m_view->setCurrentItem(m_view->currentItem()->prevItem()); | ||
494 | slotShowImage(name); | 495 | slotShowImage(name); |
495 | } | 496 | } |
496 | 497 | ||
497 | void PIconView::slotShowImage() | 498 | void PIconView::slotShowImage() |