[orca] Remove another (seemingly) pointless update
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove another (seemingly) pointless update
- Date: Wed, 29 Apr 2020 00:22:12 +0000 (UTC)
commit c460a55c4ee6824f20616ad2a3019ff2fb2f37f9
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 28 20:18:57 2020 -0400
Remove another (seemingly) pointless update
_setFlatReviewContextToBeginningOfBrailleDisplay() was calculating
and updating the value of targetCursorCell. But no updates were made
after that. And then the only two callers of that method were immediately
resetting the value to 1. So remove what appears to be unneeded work.
src/orca/scripts/default.py | 22 ----------------------
1 file changed, 22 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 75308b0c8..64f92e0a4 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1056,16 +1056,8 @@ class Script(script.Script):
else:
self.panBrailleInDirection(panAmount, panToLeft=True)
- # This will update our target cursor cell
- #
self._setFlatReviewContextToBeginningOfBrailleDisplay()
-
- # TODO - JD: Why are we resetting the target cursor cell here?
- oldCell = self.targetCursorCell
self.targetCursorCell = 1
- msg = "DEFAULT: pan left: targetCursorCell %i -> %i" % (oldCell, self.targetCursorCell)
- debug.println(debug.LEVEL_INFO, msg, True)
-
self.updateBrailleReview(self.targetCursorCell)
elif self.isBrailleBeginningShowing() and orca_state.locusOfFocus \
and self.utilities.isTextArea(orca_state.locusOfFocus):
@@ -1131,16 +1123,8 @@ class Script(script.Script):
else:
self.panBrailleInDirection(panAmount, panToLeft=False)
- # This will update our target cursor cell
- #
self._setFlatReviewContextToBeginningOfBrailleDisplay()
-
- # TODO - JD: Why are we resetting the target cursor cell here?
- oldCell = self.targetCursorCell
self.targetCursorCell = 1
- msg = "DEFAULT: pan right: targetCursorCell %i -> %i" % (oldCell, self.targetCursorCell)
- debug.println(debug.LEVEL_INFO, msg, True)
-
self.updateBrailleReview(self.targetCursorCell)
elif self.isBrailleEndShowing() and orca_state.locusOfFocus \
and self.utilities.isTextArea(orca_state.locusOfFocus):
@@ -3517,12 +3501,6 @@ class Script(script.Script):
msg = "DEFAULT: Offset for region: %i" % offset
debug.println(debug.LEVEL_INFO, msg, True)
- # TODO - JD: Why are we doing this here? The only caller undoes it.
- oldCell = self.targetCursorCell
- self.targetCursorCell = region.brailleOffset - braille.viewport[0]
- msg = "DEFAULT: Updating targetCursorCell %i -> %i" % (oldCell, self.targetCursorCell)
- debug.println(debug.LEVEL_INFO, msg, True)
-
[word, charOffset] = region.zone.getWordAtOffset(offset)
if word:
msg = "DEFAULT: Setting start of display to %s, %i" % (str(word), charOffset)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]