summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-11-28 11:30:42 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-28 11:11:20 -0800
commit30159bdd1f43884b83a9a3d44e3b2a9e12545c0e (patch)
treec2598b8b14a2988cca29170b3ce18050d4430390 /src
parent322a468291301c82f8c6b69dc7734e7124a55506 (diff)
downloadandroid_packages_apps_Gallery2-30159bdd1f43884b83a9a3d44e3b2a9e12545c0e.tar.gz
android_packages_apps_Gallery2-30159bdd1f43884b83a9a3d44e3b2a9e12545c0e.tar.bz2
android_packages_apps_Gallery2-30159bdd1f43884b83a9a3d44e3b2a9e12545c0e.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
Diffstat (limited to 'src')
-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;