X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FPhotoPopupFunction.java;h=da9c5ca127d869ca64be4fb56fe63049a800c7b2;hb=4d5796d02a15808311c09448d79e6e7d1de9d636;hp=6b8b3e016143861f3caf648ce7f5dba03be381e4;hpb=f35b6d628f68e3b5ef19965ad8988d0dd1eb8efa;p=GpsPrune.git diff --git a/tim/prune/function/PhotoPopupFunction.java b/tim/prune/function/PhotoPopupFunction.java index 6b8b3e0..da9c5ca 100644 --- a/tim/prune/function/PhotoPopupFunction.java +++ b/tim/prune/function/PhotoPopupFunction.java @@ -61,7 +61,14 @@ public class PhotoPopupFunction extends GenericFunction _frame.setLocationRelativeTo(_parentFrame); } initFrame(); - _frame.setVisible(true); + final Photo photo = _app.getTrackInfo().getCurrentPhoto(); + if (photo.getWidth() <= 0 || photo.getHeight() <= 0) { + _app.showErrorMessageNoLookup(getNameKey(), I18nManager.getText("error.showphoto.failed") + + " : " + photo.getName()); + } + else { + _frame.setVisible(true); + } } /** @@ -71,8 +78,8 @@ public class PhotoPopupFunction extends GenericFunction { _frame.setVisible(false); Photo photo = _app.getTrackInfo().getCurrentPhoto(); - _frame.setTitle(photo.getFile().getName()); - _label.setText("'" + photo.getFile().getName() + "' (" + _frame.setTitle(photo.getName()); + _label.setText("'" + photo.getName() + "' (" + photo.getWidth() + " x " + photo.getHeight() + ")"); _photoThumb.setPhoto(photo); }