After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735426 - Red fixed number remains red after board is cleared
Red fixed number remains red after board is cleared
Status: RESOLVED FIXED
Product: gnome-sudoku
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-sudoku-maint
gnome-sudoku-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-26 03:42 UTC by Michael Catanzaro
Modified: 2014-09-05 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
saved game (4.29 KB, application/octet-stream)
2014-08-26 03:42 UTC, Michael Catanzaro
  Details
screenshot (20.50 KB, image/png)
2014-08-26 03:43 UTC, Michael Catanzaro
  Details
Clear all redmarks when the board is cleared. (835 bytes, patch)
2014-08-27 03:27 UTC, Arnaud B.
needs-work Details | Review
Clear all redmarks when the board is cleared. (659 bytes, patch)
2014-09-05 00:33 UTC, Arnaud B.
committed Details | Review

Description Michael Catanzaro 2014-08-26 03:42:43 UTC
Created attachment 284470 [details]
saved game

Load the attached game (by copying it into ~/.local/share/gnome-sudoku) with Show Warnings on. There should be a bunch of red numbers. Now click Clear Board. The 2 remains red, even though there are no more numbers left to conflict with it.
Comment 1 Michael Catanzaro 2014-08-26 03:43:01 UTC
Created attachment 284471 [details]
screenshot
Comment 2 Arnaud B. 2014-08-27 03:27:24 UTC
Created attachment 284573 [details] [review]
Clear all redmarks when the board is cleared.

I can reproduce with your savefile but not with other plays. But that doesn’t matter, here’s the one-line patch I suggest.
Comment 3 Parin Porecha 2014-08-29 21:45:31 UTC
Review of attachment 284573 [details] [review]:

::: src/gnome-sudoku.vala
@@ +321,3 @@
             {
                 view.clear ();
+                game.board.broken_coords.clear ();

It'd be better if you add this to SudokuGame's reset() instead.
Let's have all the reset related libsudoku operations at one place :-)
Comment 4 Arnaud B. 2014-09-05 00:33:30 UTC
Created attachment 285446 [details] [review]
Clear all redmarks when the board is cleared.
Comment 5 Michael Catanzaro 2014-09-05 14:07:43 UTC
Attachment 285446 [details] pushed as d4f60e6 - Clear all redmarks when the board is cleared.