From 30159bdd1f43884b83a9a3d44e3b2a9e12545c0e Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Fri, 28 Nov 2014 11:30:42 +0800 Subject: 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 --- src/com/android/gallery3d/filtershow/history/HistoryManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android') 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; -- cgit v1.2.3