From 77874b8f61b2b72e310413c2cd1eb83cf0d21cbe Mon Sep 17 00:00:00 2001 From: Samuel Kacer Date: Mon, 25 Apr 2022 13:10:26 +0100 Subject: [PATCH] Fix status being read wile outside IntelliJ --- README.md | 2 ++ addon/appModules/idea64.py | 9 ++++----- buildVars.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ad8a82..26d9c0d 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ inside editor: * alt + shift + F9: open run dialogue (note: if editor caret is on unit test, this will also autogenerate a run configuration for running that specific test case) ## Changelog +### Version 1.3.1 +* fixed the status bar sometimes being read while not in IntelliJ ### Version 1.3.0 * added feature for automatically reading errors and other status bar changes (thanks to Thiago @thgcode for the contribution!) * reading status bar with NVDA + I is much faster diff --git a/addon/appModules/idea64.py b/addon/appModules/idea64.py index 23ae6f0..8d1e20c 100644 --- a/addon/appModules/idea64.py +++ b/addon/appModules/idea64.py @@ -176,14 +176,13 @@ def script_readStatusBar(self, gesture): ui.message(msg) def getStatusBar(self, refresh: bool = False): + obj = api.getForegroundObject() + if obj is None or not obj.appModule.appName == "idea64": + # Ignore cases nvda is lost + return if self.status and not refresh: return self.status else: - obj = api.getForegroundObject() - if obj is None or not obj.appModule.appName == "idea64": - # Ignore cases nvda is lost - return - obj = obj.simpleFirstChild while obj is not None: if obj.role == STATUSBAR: diff --git a/buildVars.py b/buildVars.py index 6daea30..f6671fd 100644 --- a/buildVars.py +++ b/buildVars.py @@ -25,7 +25,7 @@ def _(arg): # Translators: Long description to be shown for this add-on on add-on information from add-ons manager "addon_description": _("Adds support for using IntelliJ with NVDA."), # version - "addon_version": "1.3.0", + "addon_version": "1.3.1", # Author(s) "addon_author": "Samuel Kacer ", # URL for the add-on documentation support