[gnome-sudoku] check for none in set_value



commit 162ad9faacf779d9137d5acc3dc961f8d8232c0d
Author: gQuigs gMail com <gQuigs gMail com>
Date:   Fri May 30 22:56:00 2014 -0500

    check for none in set_value
    
    This fixes undo when only one number is on the board.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731011

 src/lib/number_box.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/lib/number_box.py b/src/lib/number_box.py
index 419fbc0..2a7d15f 100644
--- a/src/lib/number_box.py
+++ b/src/lib/number_box.py
@@ -709,7 +709,7 @@ class NumberBox (Gtk.DrawingArea):
         pass
 
     def set_value (self, v):
-        if 0 < v <= self.upper:
+        if v != None and 0 < v <= self.upper:
             self.set_text(str(v))
         else:
             self.set_text('')


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