From 2fdded00aa2c3ac4595ddab7b8a942801d202e20 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 28 May 2018 22:24:27 +0200 Subject: [PATCH] make attrib review work --- src/fenrirscreenreader/core/attributeManager.py | 4 ++++ src/fenrirscreenreader/core/cursorManager.py | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fenrirscreenreader/core/attributeManager.py b/src/fenrirscreenreader/core/attributeManager.py index 10152172..586e2afc 100644 --- a/src/fenrirscreenreader/core/attributeManager.py +++ b/src/fenrirscreenreader/core/attributeManager.py @@ -19,6 +19,10 @@ class attributeManager(): self.env = environment def shutdown(self): pass + def getCurrAttributeCursor(self): + return self.currAttributeCursor + def isAttributeCursorActive(self): + return self.currAttributeCursor != None def isAttributeChange(self): if not self.prevAttributes: return False diff --git a/src/fenrirscreenreader/core/cursorManager.py b/src/fenrirscreenreader/core/cursorManager.py index 5d44d458..45e29c17 100644 --- a/src/fenrirscreenreader/core/cursorManager.py +++ b/src/fenrirscreenreader/core/cursorManager.py @@ -64,10 +64,8 @@ class cursorManager(): if not self.env['screen']['newCursorReview']: self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy() if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight') and \ - self.env['screen']['newCursorAttrib'] != None: - if self.env['screen']['newCursorAttrib']['x'] != 0 and \ - self.env['screen']['newCursorAttrib']['y'] != 0: - self.env['screen']['newCursorReview'] = self.env['screen']['newCursorAttrib'].copy() + self.env['runtime']['attributeManager'].isAttributeCursorActive(): + self.env['screen']['newCursorReview'] = self.env['screen']['newCursorAttrib'].copy() def setReviewCursorPosition(self, x, y): if not self.isReviewMode():