diff options
author | Stijn Buys <ingar@osirion.org> | 2012-04-30 16:09:18 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-04-30 16:09:18 +0000 |
commit | 546dac25aa0277460b3543a8652307d2b80afd42 (patch) | |
tree | 0f460a694854a4d3b476ae002ea8170f6e076020 /src | |
parent | e1ca4c711a5b54653f58f6320f193bae1be62f61 (diff) |
Do not write angles key if all angles are 0.
Diffstat (limited to 'src')
-rw-r--r-- | src/entityproperties.cc | 5 |
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"); |