Browse Source

CHART-2645 npe

master
zheng 6 years ago
parent
commit
c53cc5d582
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImagePreviewPane.java

2
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImagePreviewPane.java

@ -107,7 +107,7 @@ public class ImagePreviewPane extends JComponent implements Scrollable, ImagePre
public void setImageWithSuffix(ImageWithSuffix image) {
this.image = image;
// need to reset the size of JViewPort.
if (this.image == null) {
if (this.image == null || this.image.getImage() == null) {
if (this.getParent() instanceof JViewport) {
UIScrollBar tmpJScrollBar = new UIScrollBar(UIScrollBar.HORIZONTAL);
Dimension newDimension = new Dimension(this.getSize().width - tmpJScrollBar.getPreferredSize().height, this.getSize().height

Loading…
Cancel
Save