X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FPhotoPopupFunction.java;h=da9c5ca127d869ca64be4fb56fe63049a800c7b2;hp=1a81be110ad7636a6a314b8e44942be8e71887b1;hb=4d5796d02a15808311c09448d79e6e7d1de9d636;hpb=f1b92378a792131ac8fb33a869405851d5b2d1f7 diff --git a/tim/prune/function/PhotoPopupFunction.java b/tim/prune/function/PhotoPopupFunction.java index 1a81be1..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); + } } /**