Skip to content

Commit

Permalink
#105: ancient Das2
Browse files Browse the repository at this point in the history
bug where changing non-black color to black with GUI droplist would 
not work is fixed, now that the model is updated.
  • Loading branch information
jbfaden committed Apr 18, 2024
1 parent 8f57d2b commit 7db54d3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public void setValue(Object obj) {
editorSupport.setValue(obj);
if ( oldValue!=obj ) {
choice.setSelectedItem(obj);
((ColorChoiceModel)choice.getModel()).setSelectedItem(obj);
ColorChoiceModel model= new ColorChoiceModel();
model.setSelectedItem(obj);
choice.setModel( model ); // This must be reset so that selectedItemReminder is correct. https://github.com/das-developers/das2java/issues/105
choice.repaint();
}
}
Expand Down

0 comments on commit 7db54d3

Please sign in to comment.