[mediaframe applet] Fix broken selection of fill mode
ClosedPublic

Authored by kossebau on Apr 11 2018, 11:46 PM.

Details

Summary

"comboBoxItems" does not reference anything, at least after
2700c2f7c5d52aff276bea3774b5bd3552d91157
Instead the model of the combobox created by JS due to i18n() calls needs
to be indirectly referenced.

To not only avoid some race condition during setup, text of the
fillModeDescription label is now set by a binding, instead of being
manually set in onCurrentIndexChanged handler of the combobox

Test Plan

Description of fill mode is now correct on initial config page view.
Selecting another fill mode results in update of the description.
Selecting another fill mode now also actually works.

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Apr 11 2018, 11:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 11 2018, 11:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Apr 11 2018, 11:46 PM

Target: 5.12 branch.

D10618 also handled this, though only for master and by some long explicit if-else method instead of using the model & index. I would propose to change master to also use the old model with this fix instead, seems more elegant and simpler to read.

davidedmundson accepted this revision.Apr 17 2018, 12:51 PM
This revision is now accepted and ready to land.Apr 17 2018, 12:51 PM
This revision was automatically updated to reflect the committed changes.