[gnome-sudoku] Revert "view: Remove unneeded explicit notifies"



commit 515afc0da25bb913a8d695e75263c41aebe2180a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Mar 12 17:03:23 2017 -0500

    Revert "view: Remove unneeded explicit notifies"
    
    This reverts commit 5e9ee42481dad645c632e2ec74d0617d9a3cd3ce.
    
    These may have been unneeded in the past, but they're needed now,
    otherwise cleared squares don't become cleared until the next click on
    the board.

 src/sudoku-view.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 41a05c4..c6323a1 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -176,6 +176,8 @@ private class SudokuCellView : Gtk.DrawingArea
         number_picker = new NumberPicker (ref game.board);
         number_picker.number_picked.connect ((o, number) => {
             value = number;
+            if (number == 0)
+                notify_property ("value");
             this.game.board.disable_all_earmarks (row, col);
 
             popover.hide ();
@@ -307,6 +309,7 @@ private class SudokuCellView : Gtk.DrawingArea
         if (k_no == 0 || k_name == "BackSpace" || k_name == "Delete")
         {
             value = 0;
+            notify_property ("value");
             return true;
         }
 
@@ -426,6 +429,8 @@ private class SudokuCellView : Gtk.DrawingArea
                 else
                     background_color = is_fixed ? fixed_cell_color : free_cell_color;
             }
+
+            notify_property ("value");
         }
     }
 


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