diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index 7d147bd6..619a3f7c 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -38,7 +38,7 @@ class fenrirManager(): parser.add_argument('-o', '--options', metavar='SECTION#SETTING=VALUE;..', default='', help='Overwrite options in given settings file. Sections, settings and Values are cases sensitive') parser.add_argument('-d', '--debug', action='store_true', help='Turns on Debugmode') parser.add_argument('-p', '--print', action='store_true', help='Print debug messages on screen') - parser.add_argument('-e', '--emulated-pty', action='store_true', help='Use PTY emulation and escape sequences for input') + parser.add_argument('-e', '--emulated-pty', action='store_true', help=' se PTY emulation and escape sequences for input. Allows to use fenrir on the desktop, in a terminal for X or Wayland') parser.add_argument('-E', '--emulated-evdev', action='store_true', help='Use PTY emulation and evdev for input (single instance)') try: args = parser.parse_args() diff --git a/src/fenrirscreenreader/core/vmenuManager.py b/src/fenrirscreenreader/core/vmenuManager.py index 254cb1ac..a106d238 100755 --- a/src/fenrirscreenreader/core/vmenuManager.py +++ b/src/fenrirscreenreader/core/vmenuManager.py @@ -146,11 +146,20 @@ class vmenuManager(): self.env['bindings'] = self.env['runtime']['settingsManager'].getBindingBackup() except: pass - def createMenuTree(self): - self.currIndex = None + def createMenuTree(self, resetIndex = True): + if resetIndex: + self.currIndex = None menu = self.fs_tree_to_dict( self.defaultVMenuPath) if menu: self.menuDict = menu + # index still valid? + if self.currIndex != None: + try: + r = self.getValueByPath(self.menuDict, self.currIndex) + if r == {}: + self.currIndex = None + except: + self.currIndex = None def executeMenu(self): if self.currIndex == None: return