SudokuMonster / SukakuExplainer

Modification to Sudoku Explainer (SE) by Nicolas Juillerat to accommodate Sukaku (Pencilmark) Sudoku puzzles
GNU Lesser General Public License v2.1
71 stars 14 forks source link

Set selected solving techniques default #82

Closed lordlouckster closed 4 years ago

lordlouckster commented 4 years ago

Currently, there is no option to set selected solving techniques default. Every restart of the program, the default solving techniques are set. The default set doesn't contain all techniques.

If I could set selected techniques default, they would stay every restart. That would be a great improvement, so I wouldn't have to set all techniques manually every restart.

SudokuMonster commented 4 years ago

Hi anonymous7002 , You are correct. The default set is chosen to suit the current setup as some techniques are designed for variants or are just too slow. The techniques are normally controlled by Settings.init()

I will look into your suggestion and see if it can be accomplished in the next release

SudokuMonster commented 4 years ago

Sukaku Explainer v1.15.7 and onwards will save the Variants being used on exit to registry. These would be loaded again at startup automatically.

On the to-do list is to do the same with solving techniques

1to9only commented 4 years ago

Untested - but it would seem to me that saved settings will be reloaded when using command line (serate), and this may result in some undesirable effects, e.g.

SudokuMonster commented 4 years ago

I'll check this … I can see your point … every time getInstance() is used then it would default to what in the registry preferences. So potentially the effects are both ways Command ---> GUI and GUI ---> Command.

I can probably see a fix using an isGUI() in Settings

SudokuMonster commented 4 years ago

load() is called from Settings which calls it every time an getInstance() is called I can't see why load() needs to be called every time. It is needed only once at the very beginning. I'll see if that works!

SudokuMonster commented 4 years ago

Problem resolved. All save() calls are from sudokuFrame. There one load() call made by engine.main

I will publish a new release shortly due to this issue and due the bug that was fixed in 4d5d558

lordlouckster commented 2 years ago

Not working anymore in 1.18.1.