Skip to content

Commit

Permalink
[engraving] added systemdivider write
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed Apr 12, 2023
1 parent f0ce78b commit b3262d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/engraving/rw/400/twrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1975,14 +1975,21 @@ void TWrite::write(const Symbol* item, XmlWriter& xml, WriteContext& ctx)
xml.endElement();
}

void TWrite::write(const System* item, XmlWriter& xml, WriteContext&)
void TWrite::write(const System* item, XmlWriter& xml, WriteContext& ctx)
{
xml.startElement(item);
if (item->systemDividerLeft() && item->systemDividerLeft()->isUserModified()) {
item->systemDividerLeft()->write(xml);
write(item->systemDividerLeft(), xml, ctx);
}
if (item->systemDividerRight() && item->systemDividerRight()->isUserModified()) {
item->systemDividerRight()->write(xml);
write(item->systemDividerRight(), xml, ctx);
}
xml.endElement();
}

void TWrite::write(const SystemDivider* item, XmlWriter& xml, WriteContext& ctx)
{
xml.startElement(item, { { "type", (item->dividerType() == SystemDivider::Type::LEFT ? "left" : "right") } });
writeProperties(static_cast<const BSymbol*>(item), xml, ctx);
xml.endElement();
}
1 change: 1 addition & 0 deletions src/engraving/rw/400/twrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class TWrite
static void write(const Sticking* item, XmlWriter& xml, WriteContext& ctx);
static void write(const Symbol* item, XmlWriter& xml, WriteContext& ctx);
static void write(const System* item, XmlWriter& xml, WriteContext& ctx);
static void write(const SystemDivider* item, XmlWriter& xml, WriteContext& ctx);

private:
static void writeProperty(const EngravingItem* item, XmlWriter& xml, Pid pid);
Expand Down

0 comments on commit b3262d1

Please sign in to comment.