Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-04-30 16:09:18 +0000
committerStijn Buys <ingar@osirion.org>2012-04-30 16:09:18 +0000
commit546dac25aa0277460b3543a8652307d2b80afd42 (patch)
tree0f460a694854a4d3b476ae002ea8170f6e076020 /src
parente1ca4c711a5b54653f58f6320f193bae1be62f61 (diff)
Do not write angles key if all angles are 0.
Diffstat (limited to 'src')
-rw-r--r--src/entityproperties.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/entityproperties.cc b/src/entityproperties.cc
index 533c1fc..08c5088 100644
--- a/src/entityproperties.cc
+++ b/src/entityproperties.cc
@@ -97,6 +97,7 @@ void EntityProperties::save(QTextStream &textstream)
save_comment(textstream, "label");
if (label().size())
textstream << "label=" << label() << '\n';
+
save_comment(textstream, "name");
if (name().size())
textstream << "name=" << name() << '\n';
@@ -107,7 +108,9 @@ void EntityProperties::save(QTextStream &textstream)
// angles
save_comment(textstream, "angles");
- textstream << "angles=" << angles().y() << " " << angles().x() << " " << angles().z() << '\n';
+ if ((angles().x() != 0) || (angles().y() != 0) || (angles().z() != 0)) {
+ textstream << "angles=" << angles().y() << " " << angles().x() << " " << angles().z() << '\n';
+ }
// radius
save_comment(textstream, "radius");