<table><tr><td style="">davidedmundson created this revision.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: KWin, kwin, plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5401" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The KCM has a context property of the currently set theme index. This is<br />
set before the decorations model is populated, so it is currently always<br />
-1.</p>
<p>This model is populated after the constructor but before<br />
KCModule::load().</p>
<p>KCModule::load is called from KCModule::showEvent so before<br />
QQuickGridView will start doing anything with delegates.</p>
<p>This fixes the problem simply and also avoid parsing the config file<br />
multiple times.</p>
<p>This bug was introduced in 5.9.4:</p>
<p>Someone made a (tested) change to make sure the view scrolled to the<br />
right place on startup.<br />
I then made a (tested) commit fixing the crash on exit<br />
The author then updated his patch to my changes, but now in a way that<br />
didn't work.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Opened system settings module with a million decorations.<br />
The correct entry was visible and highlighted.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>Plasma/5.9</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5401" rel="noreferrer">https://phabricator.kde.org/D5401</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcmkwin/kwindecoration/kcm.cpp<br />
kcmkwin/kwindecoration/kcm.h<br />
kcmkwin/kwindecoration/qml/Previews.qml</div></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, KWin, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol<br /></div>