Bug 373245

Summary: kmahjongg starts new game or demo without warning
Product: [Applications] kmahjongg Reporter: Eric Forgeot <eforgeot>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: CerebrosuS, kde-games-bugs
Priority: NOR    
Version: 0.8   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch-1
Patch-2
Patch-3

Description Eric Forgeot 2016-12-04 10:36:06 UTC
If during the play we click on "new" or type "d" (instead of "f", for turning the board), the kmahjongg will start a new game or demo without warning, it means loosing the current play. Especially the "d" key is close to the "f" one, which means possible mistake and game restart without notice.
Comment 1 Christian Krippendorf 2017-02-23 10:22:56 UTC
Created attachment 104182 [details]
Patch-1
Comment 2 Christian Krippendorf 2017-02-23 10:23:19 UTC
Created attachment 104183 [details]
Patch-2
Comment 3 Christian Krippendorf 2017-02-23 10:23:35 UTC
Created attachment 104184 [details]
Patch-3
Comment 4 Christian Krippendorf 2017-02-23 10:24:51 UTC
The three patches solve the issue by an question dialog. Decide by yourself if you want to push it or change it before.

Greetings
Comment 5 Bug Janitor Service 2022-06-25 16:22:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/games/kmahjongg/-/merge_requests/8
Comment 6 Christian Krippendorf 2022-07-08 15:59:50 UTC
Git commit 4cb86176e64bb8cb924d529184dfa1e767fb7e95 by Christian Krippendorf.
Committed on 08/07/2022 at 15:59.
Pushed by krippendorf into branch 'master'.

Ask before demo mode after change

When starting a demo, the game will be restarted and there is no
question, whether it should be saved. Now if the game changed,
the user gets the opportunity to save the game before demo or
a game restart.

M  +69   -0    src/kmahjongg.cpp
M  +14   -0    src/kmahjongg.h

https://invent.kde.org/games/kmahjongg/commit/4cb86176e64bb8cb924d529184dfa1e767fb7e95