{
if (adjusting)
{
- // return;
+ return;
}
if (!isChoiceParameter)
{
if (isChoiceParameter)
{
choicebox = buildComboBox(parm);
- choicebox.setSelectedItem(parm.getValue());
choicebox.addActionListener(this);
controlsPanel.add(choicebox, BorderLayout.CENTER);
}
}
}
- if (!isChoiceParameter && parm != null)
+ String value = parm.getValue();
+ if (value != null)
{
- valueField.setText(parm.getValue());
+ if (isChoiceParameter)
+ {
+ choicebox.setSelectedItem(value);
+ }
+ else
+ {
+ valueField.setText(value);
+ }
}
lastVal = updateSliderFromValueField();
adjusting = false;