*NVDAObject.event_caret: only set the review position to the caret if the current navigator object is this object.
*VirtualBuffer._set_selection: rather than unconditionally setting the review position to the new caret position, instead only do this if the current navigator object is the root of this virtualBuffer.
*TreeInterceptor._set_passthrough: if passthrough is turning on, and the focus is currently inside this treeInterceptor, and the review follows focus option is on, set the navigator object to the focus.
*TreeInterceptor._set_selection: if passthrough is turning off, and the navigator object is inside this treeInterceptor, and the review follows caret option is turned on, set the navigator object to the root of this treeInterceptor.
def event_caret(self):\r
if self is api.getFocusObject() and not eventHandler.isPendingEvents("gainFocus"):\r
braille.handler.handleCaretMove(self)\r
- if config.conf["reviewCursor"]["followCaret"]:\r
+ if config.conf["reviewCursor"]["followCaret"] and api.getNavigatorObject() is self: \r
try:\r
api.setReviewPosition(self.makeTextInfo(textInfos.POSITION_CARET))\r
except (NotImplementedError, RuntimeError):\r
info = self.makeTextInfo(textInfos.POSITION_CARET)\r
except:\r
return\r
- if config.conf["reviewCursor"]["followCaret"]:\r
+ if config.conf["reviewCursor"]["followCaret"] and api.getNavigatorObject() is self:\r
api.setReviewPosition(info.copy())\r
if speakUnit:\r
info.expand(speakUnit)\r
from logHandler import log\r
import baseObject\r
import api\r
+import config\r
import braille\r
\r
runningTable=set()\r
return\r
self._passThrough = state\r
if state:\r
+ if config.conf['reviewCursor']['followFocus']:\r
+ focusObj=api.getFocusObject()\r
+ if self is focusObj.treeInterceptor:\r
+ api.setNavigatorObject(focusObj)\r
braille.handler.handleGainFocus(api.getFocusObject())\r
else:\r
+ obj=api.getNavigatorObject()\r
+ if config.conf['reviewCursor']['followCaret'] and self is obj.treeInterceptor: \r
+ api.setNavigatorObject(self.rootNVDAObject)\r
braille.handler.handleGainFocus(self)\r
\r
_cache_shouldPrepare=True\r
super(VirtualBuffer, self)._set_selection(info)\r
if isScriptWaiting() or not info.isCollapsed:\r
return\r
- api.setReviewPosition(info)\r
+ if config.conf['reviewCursor']['followCaret'] and api.getNavigatorObject() is self.rootNVDAObject:\r
+ api.setReviewPosition(info)\r
if reason == speech.REASON_FOCUS:\r
focusObj = api.getFocusObject()\r
if focusObj==self.rootNVDAObject:\r