From 4a631dc9fd1045a5bef9d2e4e4f22bf93c75332b Mon Sep 17 00:00:00 2001 From: James Teh Date: Fri, 6 May 2011 09:37:26 +1000 Subject: [PATCH] Don't announce "no indent" when a control is focused. It's fair to assume no indentation unless otherwise specified. --- source/speech.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/speech.py b/source/speech.py index df24ca9c9..e87969a8f 100755 --- a/source/speech.py +++ b/source/speech.py @@ -654,7 +654,10 @@ def speakTextInfo(info,useCache=True,formatConfig=None,unit=None,extraDetail=Fal text=" ".join(relativeTextList) if unit == textInfos.UNIT_LINE and formatConfig["reportLineIndentation"]: (lineIndentation, text) = calculateTextIndentation(text) - oldLineIndentation = getattr(info.obj,'_speakTextInfo_lineIndentationCache', '') + oldLineIndentation = getattr(info.obj,'_speakTextInfo_lineIndentationCache', None) + if not oldLineIndentation: + # Assume no indent by default. + oldLineIndentation = calculateTextIndentation("")[0] if lineIndentation != oldLineIndentation: textList.append(lineIndentation) info.obj._speakTextInfo_lineIndentationCache = lineIndentation -- 2.11.0