OSDN Git Service

Do not add crop into preset if in inital setup
authorJohn Hoford <hoford@google.com>
Fri, 26 Oct 2012 01:38:51 +0000 (18:38 -0700)
committerJohn Hoford <hoford@google.com>
Fri, 26 Oct 2012 01:39:02 +0000 (18:39 -0700)
bug:7417545
Change-Id: I355936645e555e3d6b950923af301b437570dd93

src/com/android/gallery3d/filtershow/imageshow/ImageGeometry.java

index f99e614..6bdc527 100644 (file)
@@ -367,11 +367,13 @@ public abstract class ImageGeometry extends ImageSlave {
             getImagePreset().setGeometry(mLocalGeometry);
             resetImageCaches(this);
         } else {
-            ImagePreset copy = new ImagePreset(getImagePreset());
-            copy.setGeometry(mLocalGeometry);
-            copy.setHistoryName(getName());
-            copy.setIsFx(false);
-            setImagePreset(copy, true);
+            if (mLocalGeometry.hasModifications()) {
+                ImagePreset copy = new ImagePreset(getImagePreset());
+                copy.setGeometry(mLocalGeometry);
+                copy.setHistoryName(getName());
+                copy.setIsFx(false);
+                setImagePreset(copy, true);
+            }
         }
         invalidate();
     }