[gnome-mines] Bugfix: Fixes a problem with clicking multiple mouse buttons at once.



commit cde38ceee802edee6ae0fbd0d064269a8ad53150
Author: Isaac Lenton <isaac isuniversal com>
Date:   Sun Feb 10 01:11:32 2013 +1000

    Bugfix: Fixes a problem with clicking multiple mouse buttons at once.

 src/minefield-view.vala |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index 5334756..2bb37c0 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -408,6 +408,9 @@ public class MinefieldView : Gtk.DrawingArea
 
     private void toggle_mark (uint x, uint y)
     {
+        if (minefield.is_cleared (x, y))
+            return;
+
         switch (minefield.get_flag (x, y))
         {
         case FlagType.NONE:
@@ -582,10 +585,10 @@ public class MinefieldView : Gtk.DrawingArea
             else if (minefield.get_flag (selected_x, selected_y) != FlagType.FLAG)
                 minefield.clear_mine (selected_x, selected_y);
             redraw_sector_cb (selected_x, selected_y);
-        }
 
-        selected_x = -1;
-        selected_y = -1;
+            selected_x = -1;
+            selected_y = -1;
+        }
 
         return false;
     }


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