mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-20 21:02:23 +12:00
Corrects bug when saving empty plots
This commit is contained in:
parent
2cf7d99217
commit
747f169a2b
|
@ -475,10 +475,11 @@ def addPlotItem(root, mdl, parent=QModelIndex()):
|
||||||
step = ET.SubElement(outline, "step")
|
step = ET.SubElement(outline, "step")
|
||||||
for cY in range(mdl.columnCount(index)):
|
for cY in range(mdl.columnCount(index)):
|
||||||
cIndex = mdl.index(cX, cY, index)
|
cIndex = mdl.index(cX, cY, index)
|
||||||
val = mdl.data(cIndex)
|
# If empty, returns None, which creates trouble later with lxml, so default to ""
|
||||||
|
val = mdl.data(cIndex) or ""
|
||||||
|
|
||||||
for w in PlotStep:
|
for w in PlotStep:
|
||||||
if cY == w.value:
|
if cY == w.value and w.name:
|
||||||
step.attrib[w.name] = val
|
step.attrib[w.name] = val
|
||||||
|
|
||||||
elif Plot.steps.name in outline.attrib:
|
elif Plot.steps.name in outline.attrib:
|
||||||
|
|
Loading…
Reference in a new issue