Skip to content

Commit 1527d5c

Browse files
authored
Merge pull request #6 from easyScience/issue1
resolve the bug where the spin box id not update
2 parents 70b6e94 + 38c7ebb commit 1527d5c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

easyReflectometryApp/Gui/Pages/Sample/SideBarBasic.qml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ EaComponents.SideBarColumn {
124124

125125
onCurrentIndexChanged: {
126126
ExGlobals.Constants.proxy.currentItemsIndex = itemsTable.currentIndex
127+
repsSpinBox.value = ExGlobals.Constants.proxy.currentItemsRepetitions
127128
}
128129

129130
}
@@ -198,6 +199,7 @@ EaComponents.SideBarColumn {
198199
enabled: true //When a layer is selected
199200
collapsible: false
200201
Row {
202+
201203
spacing: EaStyle.Sizes.fontPixelSize * 0.5
202204

203205
// This integer defines how many repetitions of the layer structure should be
@@ -209,11 +211,14 @@ EaComponents.SideBarColumn {
209211
text: qsTr("Number of repetitions:")
210212
}
211213
EaElements.SpinBox {
214+
id: repsSpinBox
212215
editable: true
213216
from: 1
214217
to: 9999
215-
value: ExGlobals.Constants.proxy.currentItemsRepetitions
216-
onValueChanged: ExGlobals.Constants.proxy.currentItemsRepetitions = value
218+
value: ExGlobals.Constants.proxy.currentItemsRepetitions
219+
onValueChanged: {
220+
ExGlobals.Constants.proxy.currentItemsRepetitions = value
221+
}
217222
}
218223
}
219224

0 commit comments

Comments
 (0)