• R/O
  • HTTP
  • SSH
  • HTTPS

nvdajp: 提交

NVDA with Japanese branch


Commit MetaInfo

修訂037818ded446dcc2cfd4288335fcb9fe5f893d84 (tree)
時間2015-10-08 11:52:44
作者Takuya Nishimoto <nishimotz@gmai...>
CommiterTakuya Nishimoto

Log Message

Merge commit 'fetch_head' into jpbeta

Change Summary

差異

--- a/source/browseMode.py
+++ b/source/browseMode.py
@@ -182,7 +182,7 @@ class TextInfoQuickNavItem(QuickNavItem):
182182 @property
183183 def isAfterSelection(self):
184184 caret=self.document.makeTextInfo(textInfos.POSITION_CARET)
185- return self.textInfo.compareEndPoints(caret, "startToStart") <= 0
185+ return self.textInfo.compareEndPoints(caret, "startToStart") > 0
186186
187187 class BrowseModeTreeInterceptor(treeInterceptorHandler.TreeInterceptor):
188188 scriptCategory = inputCore.SCRCAT_BROWSEMODE
@@ -640,6 +640,7 @@ class ElementsListDialog(wx.Dialog):
640640 self._initialElement = None
641641
642642 parentElements = []
643+ isAfterSelection=False
643644 for item in self.document._iterNodesByType(elType):
644645 # Find the parent element, if any.
645646 for parent in reversed(parentElements):
@@ -656,14 +657,16 @@ class ElementsListDialog(wx.Dialog):
656657 element=self.Element(item,parent)
657658 self._elements.append(element)
658659
659- if item.isAfterSelection:
660- # The element immediately preceding or overlapping the caret should be the initially selected element.
661- # This element immediately follows the caret, so we want the previous element.
662- try:
663- self._initialElement = self._elements[-1]
664- except IndexError:
665- # No previous element.
666- pass
660+ if not isAfterSelection:
661+ isAfterSelection=item.isAfterSelection
662+ if not isAfterSelection:
663+ # The element immediately preceding or overlapping the caret should be the initially selected element.
664+ # Since we have not yet passed the selection, use this as the initial element.
665+ try:
666+ self._initialElement = self._elements[-1]
667+ except IndexError:
668+ # No previous element.
669+ pass
667670
668671 # This could be the parent of a subsequent element, so add it to the parents stack.
669672 parentElements.append(element)
Show on old repository browser