]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/function/PhotoPopupFunction.java
Version 14, October 2012
[GpsPrune.git] / tim / prune / function / PhotoPopupFunction.java
index 1a81be110ad7636a6a314b8e44942be8e71887b1..da9c5ca127d869ca64be4fb56fe63049a800c7b2 100644 (file)
@@ -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);
+               }
        }
 
        /**