diff options
author | Stijn Buys <ingar@osirion.org> | 2012-02-21 21:22:26 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-02-21 21:22:26 +0000 |
commit | 0a22de2cb23a1636f076d1dd8a05b7f873b9b653 (patch) | |
tree | 345a3273bb55dfd292ef6d34d1c7a647cd0a2ff7 /src/entityproperties.cc | |
parent | c38ac3b03a83096810003120039a934948a0eeb8 (diff) |
Save all changes made to the properties in the Sidebar.
Diffstat (limited to 'src/entityproperties.cc')
-rw-r--r-- | src/entityproperties.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/entityproperties.cc b/src/entityproperties.cc index 84a6bc4..bbef6c9 100644 --- a/src/entityproperties.cc +++ b/src/entityproperties.cc @@ -12,20 +12,21 @@ namespace editor EntityProperties::EntityProperties() { + properties_radius = 0; } EntityProperties::~EntityProperties() { } -void EntityProperties::add_subsection(const QString &name) +void EntityProperties::add_subsection_header(const QString &header) { if (properties_subsections.size()) { properties_subsections += '\n'; } properties_subsections += '['; - properties_subsections += name; + properties_subsections += header; properties_subsections += ']'; properties_subsections += '\n'; @@ -47,6 +48,14 @@ void EntityProperties::save(QTextStream &textstream) if (name().size()) textstream << "name=" << name() << '\n'; + // location + textstream << "location=" << location().x() << " " << location().y() << " " << location().z() << '\n'; + + // radius + if (radius()) { + textstream << "radius=" << radius() << '\n'; + } + // other values if (values().size()) { textstream << values(); |