Browse Source

REPORT-115482 fix: 客户模板中报表块单元格插入图片,预览报错,编辑卡死

release/11.0
Zhanying 8 months ago
parent
commit
2f846bdcab
  1. 12
      designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java

12
designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java

@ -9,6 +9,7 @@ import com.fr.base.Style;
import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.design.gui.iscrollbar.UIScrollBar;
import com.fr.general.ImageWithSuffix; import com.fr.general.ImageWithSuffix;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -92,9 +93,14 @@ public class ImagePreviewPane extends JComponent implements Scrollable, ImagePre
isLoading = false; isLoading = false;
CoreGraphHelper.waitForImage(image); CoreGraphHelper.waitForImage(image);
imageWidth = image.getWidth(null); if (image.getFineImage() != null && image.getImage() != null) {
imageHeight = image.getHeight(null); try {
imageWidth = image.getWidth(null);
imageHeight = image.getHeight(null);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
this.setToolTipText("Image Size: " + imageWidth + "x" + imageHeight + "px"); this.setToolTipText("Image Size: " + imageWidth + "x" + imageHeight + "px");
} }
fireChangeListener(); fireChangeListener();

Loading…
Cancel
Save