From ff16aac3b3015b2053bf38e1175600966e3669c1 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Sun, 16 Jun 2013 16:48:32 +0400 Subject: [PATCH] fix for cursor --- .../android/calculator/AndroidCalculatorEditorView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android-app-core/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java b/android-app-core/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java index f7811707..41e69c25 100644 --- a/android-app-core/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java +++ b/android-app-core/src/main/java/org/solovyev/android/calculator/AndroidCalculatorEditorView.java @@ -179,7 +179,7 @@ public class AndroidCalculatorEditorView extends EditText implements SharedPrefe @Override protected void onSelectionChanged(int selStart, int selEnd) { synchronized (this) { - if (!viewStateChange) { + if (initialized && !viewStateChange) { // external text change => need to notify editor super.onSelectionChanged(selStart, selEnd); @@ -193,7 +193,7 @@ public class AndroidCalculatorEditorView extends EditText implements SharedPrefe public void handleTextChange(Editable s) { synchronized (this) { - if (!viewStateChange) { + if (initialized && !viewStateChange) { // external text change => need to notify editor Locator.getInstance().getEditor().setText(String.valueOf(s)); }