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).
This commit is contained in:
Juergen Spitzmueller 2015-02-13 16:28:00 +01:00
parent 8b17b25764
commit e52b85d267

View File

@ -438,7 +438,10 @@ def get_containing_inset(lines, i):
if endins > j:
break
j = stins - 1
if endins < i:
return False
inset = get_value(lines, "\\begin_inset", stins)
if inset == "":
# shouldn't happen
@ -464,7 +467,10 @@ def get_containing_layout(lines, i):
if endlay > i:
break
j = stlay - 1
if endlay < i:
return False
lay = get_value(lines, "\\begin_layout", stlay)
if lay == "":
# shouldn't happen