Skip to content

Commit 62948e7

Browse files
slider labels are not correctly updated.
1 parent 6f00316 commit 62948e7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/springcloud/properties/AzureSlider.form

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
1414
</constraints>
1515
<properties>
16-
<majorTickSpacing value="50"/>
17-
<maximum value="500"/>
16+
<majorTickSpacing value="5"/>
17+
<maximum value="25"/>
1818
<minimum value="0"/>
19-
<minorTickSpacing value="10"/>
19+
<minorTickSpacing value="1"/>
2020
<paintLabels value="true"/>
2121
<paintTicks value="true"/>
2222
<paintTrack value="true"/>
2323
<snapToTicks value="false"/>
24-
<value value="50"/>
24+
<value value="1"/>
2525
<valueIsAdjusting value="true"/>
2626
</properties>
2727
</component>

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/springcloud/properties/AzureSlider.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public int getValue() {
6262
return (int) this.numValue.getValue();
6363
}
6464

65+
public void prepare() {
66+
this.numSlider.setLabelTable(null);
67+
}
68+
6569
private void createUIComponents() {
6670
this.numValue = new JBIntSpinner(1, 0, 10);
6771
}

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/springcloud/properties/SpringCloudAppPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private void updateForm() {
182182
numCpuModel.addAll(IntStream.range(1, 1 + (basic ? 1 : 4)).boxed().collect(Collectors.toList()));
183183
numMemoryModel.removeAllElements();
184184
numMemoryModel.addAll(IntStream.range(1, 1 + (basic ? 2 : 8)).boxed().collect(Collectors.toList()));
185+
this.numInstance.prepare();
185186
this.numInstance.setMaximum(basic ? 25 : 500);
186187
this.numInstance.setMajorTickSpacing(basic ? 5 : 50);
187188
this.numInstance.setMinorTickSpacing(basic ? 1 : 10);

0 commit comments

Comments
 (0)