fix for cursor

This commit is contained in:
Sergey Solovyev 2013-06-16 16:48:32 +04:00
parent 9a65108593
commit ff16aac3b3

View File

@ -179,7 +179,7 @@ public class AndroidCalculatorEditorView extends EditText implements SharedPrefe
@Override @Override
protected void onSelectionChanged(int selStart, int selEnd) { protected void onSelectionChanged(int selStart, int selEnd) {
synchronized (this) { synchronized (this) {
if (!viewStateChange) { if (initialized && !viewStateChange) {
// external text change => need to notify editor // external text change => need to notify editor
super.onSelectionChanged(selStart, selEnd); super.onSelectionChanged(selStart, selEnd);
@ -193,7 +193,7 @@ public class AndroidCalculatorEditorView extends EditText implements SharedPrefe
public void handleTextChange(Editable s) { public void handleTextChange(Editable s) {
synchronized (this) { synchronized (this) {
if (!viewStateChange) { if (initialized && !viewStateChange) {
// external text change => need to notify editor // external text change => need to notify editor
Locator.getInstance().getEditor().setText(String.valueOf(s)); Locator.getInstance().getEditor().setText(String.valueOf(s));
} }