Add missing 0 BFC INVERTNEXT when writing out subfile references

Sun, 03 Jul 2022 22:24:12 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 03 Jul 2022 22:24:12 +0300
changeset 326
65dbfcb859a7
parent 325
64ddcd77639f
child 327
2aa15daa0216

Add missing 0 BFC INVERTNEXT when writing out subfile references

src/model.cpp file | annotate | diff | comparison | revisions
--- a/src/model.cpp	Sun Jul 03 21:49:15 2022 +0300
+++ b/src/model.cpp	Sun Jul 03 22:24:12 2022 +0300
@@ -112,10 +112,15 @@
 {
 	return std::visit(overloaded{
 		[](const Colored<SubfileReference>& ref) {
-			return QStringLiteral("1 %1 %2 %3")
+			QString result;
+			if (ref.inverted) {
+				result += QStringLiteral("0 BFC INVERTNEXT\r\n");
+			}
+			result += QStringLiteral("1 %1 %2 %3")
 				.arg(ref.color.index)
 				.arg(transformToString(ref.transformation))
 				.arg(ref.name);
+			return result;
 		},
 		[](const Colored<LineSegment>& seg) {
 			return QStringLiteral("2 %1 %2 %3")

mercurial