Browse Source

REPORT-60161 【组件背景分离】设置九点图的线在边界上后,其他操作回来发现恢复成默认井字型

【问题原因】
点九图边界线值为0也是有效值

【改动思路】
research/11.0
Starryi 3 years ago
parent
commit
6cb031ae64
  1. 7
      designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java

7
designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java

@ -299,15 +299,16 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
Background borderImage = style.getBorderImage();
if (borderImage instanceof ImageBackground) {
// 图片类型边框
Image image = ((ImageBackground) borderImage).getImage();
int[] ninePoint = ((ImageBackground) borderImage).getNinePoint();
ImageBackground imageBackground = (ImageBackground) borderImage;
Image image = imageBackground.getImage();
if (image != null) {
this.borderLineCombo.selectBorderImage();
this.imagePreviewPane.setImageWithSuffix(((ImageBackground) borderImage).getImageWithSuffix());
this.tweakNinePointButton.setEnabled(true);
this.borderImageOpacityPane.populateBean(style.getBorderImageOpacity());
if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] > 0 && ninePoint[1] > 0 && ninePoint[2] > 0 && ninePoint[3] > 0) {
int[] ninePoint = ((ImageBackground) borderImage).getNinePoint();
if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] >= 0 && ninePoint[1] >= 0 && ninePoint[2] >= 0 && ninePoint[3] >= 0) {
this.ninePoint = Arrays.copyOf(ninePoint, 4);
} else {
this.ninePoint = new int[4];

Loading…
Cancel
Save