mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Fix bug in get_containing_inset and get_containing_layout
We have to check if this is really a parent (or just the first inset/layout we have). Candidate for branch.
This commit is contained in:
parent
fd10b868ca
commit
3d8b02b58e
@ -439,6 +439,9 @@ def get_containing_inset(lines, i):
|
|||||||
break
|
break
|
||||||
j = stins - 1
|
j = stins - 1
|
||||||
|
|
||||||
|
if endins < i:
|
||||||
|
return False
|
||||||
|
|
||||||
inset = get_value(lines, "\\begin_inset", stins)
|
inset = get_value(lines, "\\begin_inset", stins)
|
||||||
if inset == "":
|
if inset == "":
|
||||||
# shouldn't happen
|
# shouldn't happen
|
||||||
@ -465,6 +468,9 @@ def get_containing_layout(lines, i):
|
|||||||
break
|
break
|
||||||
j = stlay - 1
|
j = stlay - 1
|
||||||
|
|
||||||
|
if endlay < i:
|
||||||
|
return False
|
||||||
|
|
||||||
lay = get_value(lines, "\\begin_layout", stlay)
|
lay = get_value(lines, "\\begin_layout", stlay)
|
||||||
if lay == "":
|
if lay == "":
|
||||||
# shouldn't happen
|
# shouldn't happen
|
||||||
|
Loading…
Reference in New Issue
Block a user