Skip to content

Commit

Permalink
Don't disable table navigation commands for layout tables if the user…
Browse files Browse the repository at this point in the history
… has explicitly chosen to have layout tables reported. (#7464)
  • Loading branch information
michaelDCurran committed Aug 2, 2017
1 parent ad1dc17 commit a2e15de
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source/browseMode.py
Expand Up @@ -1557,13 +1557,14 @@ def _getTableCellCoords(self, info):
info = info.copy()
info.expand(textInfos.UNIT_CHARACTER)
fields=list(info.getTextWithFields())
# First record the ID of all layout tables so that we can skip them when searching for the deepest table
# If layout tables should not be reported, we should First record the ID of all layout tables so that we can skip them when searching for the deepest table
layoutIDs=set()
for field in fields:
if isinstance(field, textInfos.FieldCommand) and field.command == "controlStart" and field.field.get('table-layout'):
tableID=field.field.get('table-id')
if tableID is not None:
layoutIDs.add(tableID)
if not config.conf["documentFormatting"]["includeLayoutTables"]:
for field in fields:
if isinstance(field, textInfos.FieldCommand) and field.command == "controlStart" and field.field.get('table-layout'):
tableID=field.field.get('table-id')
if tableID is not None:
layoutIDs.add(tableID)
for field in reversed(fields):
if not (isinstance(field, textInfos.FieldCommand) and field.command == "controlStart"):
# Not a control field.
Expand Down

0 comments on commit a2e15de

Please sign in to comment.