Browse Source

fix: pr问题处理 #REPORT-147689

release/11.0^2
Zhanying 1 week ago
parent
commit
2a8478d438
  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,8 +225,8 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
if (standardColors == null || standardColors.size() < 8) {
return;
}
// 如果颜色数量超过了主题色数量,只取主题色数量
int range = Math.min(standardColors.size(), this.themeColorCellGrid.length - 2);
// 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);

Loading…
Cancel
Save