Browse Source

Pull request #16599: fix: 颜色选择面板数组越界 #REPORT-147689

Merge in DESIGN/design from ~ZHANYING/design:release/11.0 to release/11.0

* commit '2a8478d4382b3e771e82d306082b2236ec2e180c':
  fix: pr问题处理 #REPORT-147689
  fix: 颜色选择面板数组越界 #REPORT-147689
release/11.0
Zhanying-占盈 1 week ago
parent
commit
d130ee113d
  1. 4
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

4
designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

@ -225,7 +225,9 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
if (standardColors == null || standardColors.size() < 8) {
return;
}
for (int i = 0; i < standardColors.size(); i++) {
// range取最小值,避免数据越界
int range = Math.min(standardColors.size(), this.themeColorCellGrid.length);
for (int i = 0; i < range; i++) {
Color standardColor = standardColors.get(i);
ColorConfig colorConfig = getColorConfig(colorSelector, i);
Color[] deriveColorArr = colorConfig.getDeriveColorArr(standardColor, DEFAULT_DERIVE_COUNT);

Loading…
Cancel
Save