GNOME Bugzilla – Bug 735494
[PATCH] Reset earmark_pickers when clearing board.
Last modified: 2014-09-04 21:42:17 UTC
Created attachment 284572 [details] [review] Reset earmark_pickers when clearing board. The earkmarks popovers are not reseted when the player wants to clear the board. Here is a patch.
Review of attachment 284572 [details] [review]: I had written a patch for this bug before - https://git.gnome.org/browse/gnome-sudoku/tree/lib/sudoku-game.vala#n82 It did clear the earmarks array, but the buttons in earmark picker were still left active. But since your solution takes care of both, we can remove that line in sudoku-game.vala It'd be great if you can include it in this patch. Thanks ! ::: src/sudoku-view.vala @@ +351,3 @@ + { + if (earmark_picker != null) + for (var i = 0; i <= 8; i++) Please change the upper limit here to SudokuBoard's max_val.
Created attachment 284866 [details] [review] Reset earmark_pickers when clearing board. You’re right, here is the patch updated.
Review of attachment 284866 [details] [review]: I'm getting a CRITICAL error when there are earmarks present on the board, and I click on 'Clear Board' - (gnome-sudoku:9370): Gtk-CRITICAL **: gtk_toggle_button_set_active: assertion 'GTK_IS_TOGGLE_BUTTON (toggle_button)' failed
Created attachment 285032 [details] [review] Reset earmark_pickers when clearing board. Oops… ^^’ It was a “for (var i = 0; i <= game.board.max_val; i++)” thing (one more than necessary), that’s corrected.
Looks good, thanks! Attachment 285032 [details] pushed as 36bd743 - Reset earmark_pickers when clearing board.