Bug 357996 - Finishing a game should disable hint and solve buttons and menu items
Summary: Finishing a game should disable hint and solve buttons and menu items
Status: RESOLVED FIXED
Alias: None
Product: ksudoku
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Ian Wadham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-14 19:17 UTC by Karl Ove Hufthammer
Modified: 2018-06-29 20:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2016-01-14 19:17:58 UTC
When one has finished a sudoku game, the hint and solve buttons should be disabled.

Reproducible: Always

Steps to Reproduce:
1. Start a sudoku game.
2. Solve the sudoku game manually (or using hints or the solve feature).
3. Try clicking the ‘Hint’ or ‘Solve’ buttons or using the ‘Hint’ or ‘Solve’ menu items.

Actual Results:  
It’s possible to use the ‘Hint’ and ‘Solve’ buttons and menu items. If one uses ‘Hint’ nothing actually happens. If one use ‘Solve’, a congratulations message is shown (with an ever-increasing timer).

Expected Results:  
When one finishes a sudoku, so that the congratulations message is automatically shown, the ‘Hint’ and ‘Solve’ buttons should be disabled (greyed out), so that it’s not possible to click them. The ‘Hint’ and ‘Solve’ menu-item should also be disabled, so that it’s not possible to select them.
Comment 1 Gregor Mi 2018-05-16 00:07:44 UTC
There is some work in progress here: https://phabricator.kde.org/D12912. But currently, Undo won't re-enable the buttons again. Only a New game will re-enable the buttons. The same is true for the menu items (buttons and menu items will always behave consistent)
Comment 2 Gregor Mi 2018-06-29 20:40:22 UTC
Git commit dd10399097613913ec4187a00deace81bb170c35 by Gregor Mi.
Committed on 29/06/2018 at 20:40.
Pushed by gregormi into branch 'master'.

Improve Hint and Solve action visibility and enabled state

Summary:

- Action visibility improvement because some actions not needed in specific modes
    - Enter new puzzle: 'Hint' and 'Solve' not visible
    - Play puzzle: 'Check' not visible
    - Start page: 'Hint', 'Solve' and 'Check' not visible

- For Bug 357996 ("Finishing a game should disable hint and solve buttons and menu items")
    - Disable Hint and Solve action after puzzle was solved

Reviewers: #kde_games, aacid

Reviewed By: aacid

Subscribers: aacid, kde-games-devel

Differential Revision: https://phabricator.kde.org/D12912

M  +12   -3    src/gui/ksudoku.cpp
M  +14   -5    src/gui/ksudokugame.cpp
M  +7    -1    src/gui/ksudokugame.h

https://commits.kde.org/ksudoku/dd10399097613913ec4187a00deace81bb170c35