Don't reset the view if width or height are zero

This commit is contained in:
apriestman 2020-12-16 09:23:13 -05:00
parent 746d9635ac
commit b773be6d29

View File

@ -521,7 +521,9 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
if (nonNull(fxImage)) {
// We have a non-null image, so let's show it.
fxImageView.setImage(fxImage);
resetView(panelWidth, panelHeight);
if (panelWidth != 0 && panelHeight != 0) {
resetView(panelWidth, panelHeight);
}
masterGroup.getChildren().add(fxImageView);
masterGroup.getChildren().add(tagsGroup);