Bug 188162 - Tentative entries not restored upon Game/Load
Summary: Tentative entries not restored upon Game/Load
Status: RESOLVED FIXED
Alias: None
Product: ksudoku
Classification: Applications
Component: general (show other bugs)
Version: 0.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Ian Wadham
URL:
Keywords:
: 211223 296515 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-26 13:58 UTC by joost.t.hart
Modified: 2012-03-21 21:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0 (KDE SC 4.8)
Sentry Crash Report:


Attachments
This patch fixes the bug for me (533 bytes, patch)
2011-12-11 15:37 UTC, H.H.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joost.t.hart 2009-03-26 13:58:08 UTC
Version:           0.5 (using 4.1.4 (KDE 4.1.4), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.27-11-generic

Regular 9x9 game, extra hard :-)

When saving a game, tentative entries (right-clicked) in the diagram are saved, but when loading the same game, they are not displayed.

They only appear in some field after a (dummy) right-click in that same field. This means that they are saved and restored alright, but an operation show_all_tentatives() is missing in the Game/Load procedure.

Cheers,
Joost.
Comment 1 Johannes.Bergmeier 2010-01-20 20:01:09 UTC
*** Bug 211223 has been marked as a duplicate of this bug. ***
Comment 2 H.H. 2011-12-11 15:37:55 UTC
Created attachment 66632 [details]
This patch fixes the bug for me
Comment 3 Ian Wadham 2011-12-12 09:32:53 UTC
Thanks very much for this one-liner, H.H.  It works for me too and solves a problem that has been puzzling me for a month or two, since I got the Load action to work again.  I will incorporate your fix into KDE 4.8 trunk.

I think I see how your patch works.  View2DScene::init() is called every time a game starts and a view is created.  It sets up cells, but not markers, but that does not matter when a puzzle is generated or entered in, because there are no markers.  The Load action is different: the loaded puzzle can have markers.  By adding update() to View2DScene::init(), we do the cell changes again, but also the markers this time around.

Is that your understanding?
Comment 4 Ian Wadham 2011-12-12 09:56:51 UTC
SVN commit 1268367 by ianw:

BUG: 188162 FIXED IN: KDE SC 4.8 Ensure that markers are displayed after a Load action.

 M  +3 -0      view2d.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1268367
Comment 5 H.H. 2011-12-12 13:30:43 UTC
this was a quick and dirty fix by trying and testing and it worked as expected :)
maybe there is a better solution.

btw in kde-4.7.3 I think the difficulty-slider does not work - I have the feeling, the difficulty is always easy there. But that works in trunk.
Comment 6 Ian Wadham 2011-12-12 20:26:46 UTC
There must be some redundant code in there somewhere. The fix does some things twice, but only on infrequent occasions, so it does not really matter.

Yes. The old generator/solver created mostly easy puzzles in KDE 4.7, so I wrote a new generator/solver for KDE 4.8. I hope you are enjoying the challenge ...
Comment 7 Ian Wadham 2012-03-21 21:17:39 UTC
*** Bug 296515 has been marked as a duplicate of this bug. ***