*** empty log message ***
authorgc <gc>
Sat, 19 Apr 2008 22:11:54 +0000 (22:11 +0000)
committergc <gc>
Sat, 19 Apr 2008 22:11:54 +0000 (22:11 +0000)
bin/booh-classifier

index 51ccc80..76688e9 100644 (file)
@@ -618,8 +618,17 @@ class MainView < Gtk::DrawingArea
     end
 
     def show_next_entry(entry)
-        index = $allentries.index(entry) + 1
-        if index < $allentries.size
+        index = $allentries.index(entry)
+        if index < $allentries.size - 1
+            index += 1
+        end
+        while index < $allentries.size - 1 && $allentries[index] && ! $allentries[index].button.visible?
+            index += 1
+        end
+        while $allentries[index] && ! $allentries[index].button.visible? && index > 0
+            index -= 1
+        end
+        if index < $allentries.size && $allentries[index] && $allentries[index].button.visible?
             set_shown_entry($allentries[index])
         end
     end
@@ -846,8 +855,8 @@ def thumbnail_keypressed(entry, event)
             entry.removed = true
             entry.labeled = nil
             entry.show_bg
-            $mainview.show_next_entry(entry)
             update_visibility(entry)
+            $mainview.show_next_entry(entry)
 
             save_undo(_("set for removal"),
                       proc {
@@ -941,8 +950,8 @@ def thumbnail_keypressed(entry, event)
                     entry.removed = false
                     entry.labeled = label
                     entry.show_bg
-                    $mainview.show_next_entry(entry)
                     update_visibility(entry)
+                    $mainview.show_next_entry(entry)
 
                     save_undo(_("set label"),
                               proc {