Saving and Loading games works well in general except for the small detail, the game number displayed in the status line. It is not affected by loading a game, so reflecte the last game before loading the game. Reproducible: Always Steps to Reproduce: 1. Click Game->New to start a new game 2. Take note of the game number in the status line (for me: 1211087700) 3. Click Game->Save to save the game to a file (file name "1.kmgame") 4. Click Game->New to start a different game 5. Take note of the game number in the status line (for me: 1574007757) 6. Load the previously saved game from file 7. Take note of the game number in the status line (for me: 1574007757) Actual Results: The game number stays the same when an old game is loaded from disk. Expected Results: The status line should reflect what the engine knows about the displayed game. Either the original game number of the saved game or no game number at all. Displaying the wrong game number feels pretty wrong.
I proposed an patch fixing this issue on https://git.reviewboard.kde.org/r/125855/ Which is by the way my first contribution to a KDE project, so please be patient =)
Git commit a2834e03c2e76f8582e17262d2d14cdc0e721b48 by Albert Astals Cid, on behalf of Dustin Steinack. Committed on 01/11/2015 at 23:25. Pushed by aacid into branch 'Applications/15.08'. Save and load game number properly REVIEW: 125855 M +5 -0 boardwidget.cpp M +1 -0 boardwidget.h M +12 -0 kmahjongg.cpp http://commits.kde.org/kmahjongg/a2834e03c2e76f8582e17262d2d14cdc0e721b48
The commit that fixed this is on the master branch. It applies to the files kmahjongg.cpp, boardwidget.h and boardwidget.cpp. But boardwidget.h and boardwidget.cpp are discontinued in the frameworks (KF5) branch. The fix will need to be re-applied to the appropriate files in the frameworks branch after it is merged to master.
This works for me in current master branch with Clubs and Chips, the latter containing 144 tiles overall and 142 when I saved the game. Can you please check if yu can still reproduce in current master?
Branch "frameworks" is broken, "master" is good. Sorry for the omission.
The frameworks branch has been merged into master so the frameworks branch is not meant to be used anymore. However, this issue should have been fixed in frameworks branch from dd0be780f6 onwards, then saving is broken starting from 4c259f30d3 and then fixed again in c5c687c739 after the merge to master. :) So closing this as it works in master. Feel free to reopen if you disagree.