[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/experimental
Miklos Vajna
vmiklos at collabora.co.uk
Thu Mar 19 09:58:35 PDT 2015
android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 2dad7eb36753f9c84bfcc20c456e33104be06482
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Mar 19 17:53:38 2015 +0100
android: when in selection, avoid showing the middle handle
editeng sends LOK_CALLBACK_CURSOR_VISIBLE after the text selection is
already created. The effect of this is that after a long push on a word
you get not only the selection overlay + the start/end handles, but also
the middle one, which is not expected. Just check if we're in a
selection already, and if so, don't react to
LOK_CALLBACK_CURSOR_VISIBLE=true.
Change-Id: I939c957feb7889dfb1997fac1051cb4eaa77004c
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
index e9110f6..805ed9c 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
@@ -3,6 +3,7 @@ package org.libreoffice;
import android.content.Intent;
import android.graphics.RectF;
import android.net.Uri;
+import android.util.Log;
import org.libreoffice.kit.Document;
import org.mozilla.gecko.TextSelection;
@@ -211,7 +212,9 @@ public class InvalidationHandler implements Document.MessageCallback {
private synchronized void cursorVisibility(String payload) {
if (payload.equals("true")) {
mTextCursorLayer.showCursor();
- mTextSelection.showHandle(TextSelectionHandle.HandleType.MIDDLE);
+ if (mState != OverlayState.SELECTION) {
+ mTextSelection.showHandle(TextSelectionHandle.HandleType.MIDDLE);
+ }
} else if (payload.equals("false")) {
mTextCursorLayer.hideCursor();
mTextSelection.hideHandle(TextSelectionHandle.HandleType.MIDDLE);
More information about the Libreoffice-commits
mailing list