X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=src%2Ftim%2Fprune%2Ffunction%2FIgnoreExifThumb.java;fp=src%2Ftim%2Fprune%2Ffunction%2FIgnoreExifThumb.java;h=8b292e503a447b27612b4226b2052fd34781e197;hp=0000000000000000000000000000000000000000;hb=ce6f2161b8596f7018d6a76bff79bc9e571f35fd;hpb=2d8cb72e84d5cc1089ce77baf1e34ea3ea2f8465 diff --git a/src/tim/prune/function/IgnoreExifThumb.java b/src/tim/prune/function/IgnoreExifThumb.java new file mode 100644 index 0000000..8b292e5 --- /dev/null +++ b/src/tim/prune/function/IgnoreExifThumb.java @@ -0,0 +1,42 @@ +package tim.prune.function; + +import tim.prune.App; +import tim.prune.DataSubscriber; +import tim.prune.GenericFunction; +import tim.prune.UpdateMessageBroker; +import tim.prune.data.Photo; + +/** + * Class to provide the function to disable the exif thumbnail + * for the current photo so that the full image must be loaded + */ +public class IgnoreExifThumb extends GenericFunction +{ + /** + * Constructor + * @param inApp application object for callback + */ + public IgnoreExifThumb(App inApp) + { + super(inApp); + } + + /** Get the name key */ + public String getNameKey() { + return "function.ignoreexifthumb"; + } + + /** + * Begin the function + */ + public void begin() + { + Photo photo = _app.getTrackInfo().getCurrentPhoto(); + if (photo != null) + { + // no undo necessary, no data being edited + photo.setExifThumbnail(null); + UpdateMessageBroker.informSubscribers(DataSubscriber.PHOTOS_MODIFIED); + } + } +}