summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-11-28 11:30:42 +0800
committercretin45 <cretin45@gmail.com>2014-12-15 14:58:08 -0800
commitb5e917092a743a2195e287e9fb648ff0578eb125 (patch)
tree2a33bbd51ab3d6d7b6155a3531c337b640626062
parent04e41ae3b855fca7669f5742a3e85ceab0274077 (diff)
downloadandroid_packages_apps_Gallery2-b5e917092a743a2195e287e9fb648ff0578eb125.tar.gz
android_packages_apps_Gallery2-b5e917092a743a2195e287e9fb648ff0578eb125.tar.bz2
android_packages_apps_Gallery2-b5e917092a743a2195e287e9fb648ff0578eb125.zip
Gallery2: Fix undo button enable condition
When jump into interface of Image edit, the undo button is enable at first, for the judgement of canUndo is set true, but actually there is nothing to undo. Change canUndo's judging condition. CRs-Fixed: 759431 Change-Id: Idae9feaca62b5cdc67610cf332c2b65f1692dbb4
-rw-r--r--src/com/android/gallery3d/filtershow/history/HistoryManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/history/HistoryManager.java b/src/com/android/gallery3d/filtershow/history/HistoryManager.java
index 569b299cc..9d5065a28 100644
--- a/src/com/android/gallery3d/filtershow/history/HistoryManager.java
+++ b/src/com/android/gallery3d/filtershow/history/HistoryManager.java
@@ -68,7 +68,7 @@ public class HistoryManager {
}
public boolean canUndo() {
- if (mCurrentPresetPosition == getCount() - 1) {
+ if (mCurrentPresetPosition >= getCount() - 1) {
return false;
}
return true;