[cheese/three-point-oh] Fixed an off by one error



commit 6d75c373180564e25aca1b81aa62c4cd939e7cc3
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Sat Jul 10 17:40:05 2010 +0530

    Fixed an off by one error

 src/cheese-window.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index d2fe5bc..cdf8175 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -461,18 +461,20 @@ public class Cheese.MainWindow : Gtk.Window
     }
     current_effects_grid = effects_grids[number];
     viewport_layout.add ((Clutter.Actor)current_effects_grid);
-    for (int i = 0; i < effects_manager.effects.size; i++)
+
+    for (int i = 0; i < effects_manager.effects.size - 1 ; i++)
     {
       int page_of_effect = i / EFFECTS_PER_PAGE;
       if (page_of_effect == page_of_effect)
       {
-        effects_manager.effects[i].enable_preview ();
+        effects_manager.effects[i].enable_preview ();	
       }
       else
       {
         effects_manager.effects[i].disable_preview ();
       }
     }
+
     this.current_effects_grid.set_size (viewport.width, viewport.height);
 
     setup_effects_page_switch_sensitivity ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]