mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics/mobile: set currentIndex of QML combo boxes
Use Q_PROPERTYs of the StatsManager to correctly set the current index of comboboxes after a state changed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8f8ee5c589
commit
9a0c5df744
3 changed files with 28 additions and 6 deletions
|
@ -37,6 +37,7 @@ Kirigami.Page {
|
|||
TemplateComboBox {
|
||||
id: var1
|
||||
model: statsManager.var1List
|
||||
currentIndex: statsManager.var1Index;
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var1Changed(currentIndex)
|
||||
|
@ -54,6 +55,7 @@ Kirigami.Page {
|
|||
TemplateComboBox {
|
||||
id: var1Binner
|
||||
model: statsManager.binner1List
|
||||
currentIndex: statsManager.binner1Index;
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var1BinnerChanged(currentIndex)
|
||||
|
@ -71,6 +73,7 @@ Kirigami.Page {
|
|||
TemplateComboBox {
|
||||
id: var2
|
||||
model: statsManager.var2List
|
||||
currentIndex: statsManager.var2Index;
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var2Changed(currentIndex)
|
||||
|
@ -88,6 +91,7 @@ Kirigami.Page {
|
|||
TemplateComboBox {
|
||||
id: var2Binner
|
||||
model: statsManager.binner2List
|
||||
currentIndex: statsManager.binner2Index;
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var2BinnerChanged(currentIndex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue