display something when last shown is marked as a non visible label
authorGuillaume Cottenceau <gcottenc@gmail.com>
Fri, 23 Apr 2010 21:00:25 +0000 (23:00 +0200)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Fri, 23 Apr 2010 21:00:25 +0000 (23:00 +0200)
bin/booh-classifier

index cb7c2bd..37f224d 100644 (file)
@@ -735,6 +735,14 @@ class MainView < Gtk::DrawingArea
         end
         if index < $allentries.size && $allentries[index] && $allentries[index].button && $allentries[index].button.visible?
             try_show_entry($allentries[index])
+            return
+        end
+        #- find a fallback before
+        while index < $allentries.size && index > 0 && $allentries[index] && (! $allentries[index].button || ! $allentries[index].button.visible?)
+            index -= 1
+        end
+        if index < $allentries.size && index > 0 && $allentries[index] && $allentries[index].button && $allentries[index].button.visible?
+            try_show_entry($allentries[index])
         end
     end