From e6347f3747a746151f1f67c7a508c5e2fc9091a8 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 22 Feb 2012 21:36:54 +0000 Subject: Preserve ini file comments. preserve racetrack and checkpoint entities. --- src/entityproperties.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/entityproperties.cc') diff --git a/src/entityproperties.cc b/src/entityproperties.cc index e9ed1d0..429b759 100644 --- a/src/entityproperties.cc +++ b/src/entityproperties.cc @@ -62,15 +62,19 @@ void EntityProperties::save(QTextStream &textstream) } textstream << "[" << type() << "]" << '\n'; + save_comment(textstream, "label"); if (label().size()) textstream << "label=" << label() << '\n'; + save_comment(textstream, "name"); if (name().size()) textstream << "name=" << name() << '\n'; // location + save_comment(textstream, "location"); textstream << "location=" << location().x() << " " << location().y() << " " << location().z() << '\n'; // radius + save_comment(textstream, "radius"); if (radius()) { textstream << "radius=" << radius() << '\n'; } @@ -83,7 +87,7 @@ void EntityProperties::save(QTextStream &textstream) // info string if (info().size()) { textstream << '\n'; - + save_comment(textstream, "info"); // QTextStream operates on QString, not on QString const QString infobuffer = info(); QTextStream infostream(&infobuffer); @@ -107,9 +111,9 @@ void EntityProperties::save(QTextStream &textstream) else textstream << '\n'; } - } textstream << '\n'; } + } // namespace editor -- cgit v1.2.3