Make is_converted_from_meters / is_converted_from_inches exclusive-or.
Maybe it would be better to make a single enum from the two booleans,
if they are exclusive-or?
This commit is contained in:
Vojtech Bubnik 2021-08-05 15:35:44 +02:00
parent 413dc8d6ec
commit 49fdf3da7b
4 changed files with 29 additions and 14 deletions

View file

@ -2860,9 +2860,10 @@ namespace Slic3r {
stream << prefix << SOURCE_OFFSET_Y_KEY << "\" " << VALUE_ATTR << "=\"" << volume->source.mesh_offset(1) << "\"/>\n";
stream << prefix << SOURCE_OFFSET_Z_KEY << "\" " << VALUE_ATTR << "=\"" << volume->source.mesh_offset(2) << "\"/>\n";
}
assert(! volume->source.is_converted_from_inches || ! volume->source.is_converted_from_meters);
if (volume->source.is_converted_from_inches)
stream << prefix << SOURCE_IN_INCHES << "\" " << VALUE_ATTR << "=\"1\"/>\n";
if (volume->source.is_converted_from_meters)
else if (volume->source.is_converted_from_meters)
stream << prefix << SOURCE_IN_METERS << "\" " << VALUE_ATTR << "=\"1\"/>\n";
}