Browse Source

Pull request #5541: CHART-20429 颜色控件bug

Merge in DESIGN/design from ~BJORN/design:feature/x to feature/x

* commit '70c9fcbef47d88d76b814079c99e76be683173e7':
  CHART-20429 颜色控件bug
research/11.0
Bjorn 3 years ago
parent
commit
c5c41a8845
  1. 2
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectBox.java

2
designer-base/src/main/java/com/fr/design/style/color/ColorSelectBox.java

@ -52,6 +52,7 @@ public class ColorSelectBox extends AbstractSelectBox<Color> implements UIObserv
public JPanel initWindowPane(double preferredWidth) { public JPanel initWindowPane(double preferredWidth) {
// 下拉的时候重新生成面板,刷新最近使用颜色 // 下拉的时候重新生成面板,刷新最近使用颜色
colorPane = getColorSelectPane(); colorPane = getColorSelectPane();
colorPane.setColor(color);
colorPane.addChangeListener(new ChangeListener() { colorPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
hidePopupMenu(); hidePopupMenu();
@ -59,7 +60,6 @@ public class ColorSelectBox extends AbstractSelectBox<Color> implements UIObserv
fireDisplayComponent(ColorBackground.getInstance(color)); fireDisplayComponent(ColorBackground.getInstance(color));
} }
}); });
colorPane.setColor(color);
return colorPane; return colorPane;
} }

Loading…
Cancel
Save