Bug 454903

Summary: If a new game is started while a tile is highlighted in the old game, an unpaired tile can be removed from the new game
Product: [Applications] kmahjongg Reporter: Dan Upper <daniel.upper1968>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, kde-games-bugs
Priority: NOR    
Version: 0.9.22041   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dan Upper 2022-06-05 19:44:46 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Start new game 
2. Click on a tile, and remember that tile's position on the board
3. Click "new"
4. Click the tile in the same position on the new board

OBSERVED RESULT
The tile you clicked on disappears from the board and appears in "removed tiles"

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: plasma-desktop 5.24.5-2
KDE Frameworks Version: plasma-framework 5.94.0-1
Qt Version: qt5-base 5.15.4+kde+r146-1


ADDITIONAL INFORMATION
Board layout is "Default"; tileset is "Classic"
Comment 1 Bug Janitor Service 2022-06-06 19:38:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/games/kmahjongg/-/merge_requests/6
Comment 2 Albert Astals Cid 2022-06-06 19:39:18 UTC
Git commit c49e284e180195aacf7797842d3c930b3a2241bd by Albert Astals Cid.
Committed on 06/06/2022 at 19:36.
Pushed by aacid into branch 'release/22.04'.

Fix issue when restaring a game with a selected tile

We need to clear the selected tile otherwise clicking on the same
position again makes the tile disappear incorrectly

M  +1    -0    src/gameview.cpp

https://invent.kde.org/games/kmahjongg/commit/c49e284e180195aacf7797842d3c930b3a2241bd