From 608feddcc68559cd065537c1ff276cfd34d82e8a Mon Sep 17 00:00:00 2001 From: chrys87 Date: Fri, 23 Sep 2016 12:41:58 +0200 Subject: [PATCH] Update cursorManager.py --- src/fenrir-package/core/cursorManager.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/fenrir-package/core/cursorManager.py b/src/fenrir-package/core/cursorManager.py index 6691f12a..2b0e429f 100644 --- a/src/fenrir-package/core/cursorManager.py +++ b/src/fenrir-package/core/cursorManager.py @@ -13,4 +13,23 @@ class cursorManager(): self.env = environment def shutdown(self): pass + def clearMarks(self): + self.env['commandBuffer']['Marks']['1'] = None + self.env['commandBuffer']['Marks']['2'] = None + def setMark(self): + if not self.env['commandBuffer']['Marks']['1']: + self.env['commandBuffer']['Marks']['1'] = self.env['screenData']['newCursorReview'].copy() + else: + self.env['commandBuffer']['Marks']['2'] = self.env['screenData']['newCursorReview'].copy() + def getReviewOrTextCursor(self): + if self.env['screenData']['newCursorReview']: + cursorPos = self.env['screenData']['newCursorReview'].copy() + else: + cursorPos = self.env['screenData']['newCursor'].copy() + return cursorPos + def clearReviewCursor(self): + self.env['screenData']['oldCursorReview'] = None + self.env['screenData']['newCursorReview'] = None + def isReviewMode(self): + return self.env['screenData']['newCursorReview'] != None