Bug 342159

Summary: Layout preview in settings show random layouts
Product: [Applications] kmahjongg Reporter: Jan-Peter Nilsson <kdebugs>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, CerebrosuS, kde-games-bugs, schwarzer
Priority: NOR    
Version: 0.8   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Disable random layout while generating layout previews
Hide layout preview on random layout

Description Jan-Peter Nilsson 2014-12-23 16:15:07 UTC
When changing from random layout to a specified layout the previews in the settings window are randomized.

Reproducible: Always

Steps to Reproduce:
1. Open settings
2. Switch to the Board Layout view
3. Check Random Layout and click Apply
4. Uncheck Random Layout
5. Select different layouts

Actual Results:  
The shown previews are randomized not matching the selected layout.

Expected Results:  
The preview should show the selected layout.
Comment 1 Jan-Peter Nilsson 2014-12-23 23:55:34 UTC
Created attachment 90109 [details]
Disable random layout while generating layout previews
Comment 2 Frederik Schwarzer 2016-01-04 00:32:14 UTC
This problem has changed.
Here, after changing to randomised layout, the preview remains the previously selected layout.
When changing back to another layout, the correct one is shown.

So I would not close this as fixed as long as enabling the random layout feature keeps showing the old layout.
Comment 3 Christian Krippendorf 2019-03-27 10:03:29 UTC
Created attachment 119076 [details]
Hide layout preview on random layout
Comment 4 Albert Astals Cid 2019-03-27 22:50:38 UTC
@Christian to be honest at this point i think this bug could as well be closed without any code change, when you select random layout everything below it is grayed out clearly indicating it no longer applies.

If you feel it makes sense to commit it, go ahead.

Also please in the future use phabricator instead of posting patches to bugzilla, phabricator makes for easier book-keeping/reviewing/etc of patches.
Comment 5 Christian Krippendorf 2019-03-28 13:59:03 UTC
https://commits.kde.org/kmahjongg/837fffbc7e8e95a8a32ca4e3f741117ff877e352

@Albert Registered to phabricator. Thanks