encode names of constraints when writing to XML

This commit is contained in:
wmayer
2017-04-22 19:09:13 +02:00
parent b619b844cf
commit 444cfc397a

View File

@@ -29,6 +29,7 @@
#include <Base/Writer.h>
#include <Base/Reader.h>
#include <Base/Tools.h>
#include <App/Property.h>
#include <QDateTime>
#include "Constraint.h"
@@ -174,8 +175,9 @@ unsigned int Constraint::getMemSize (void) const
void Constraint::Save (Writer &writer) const
{
std::string encodeName = App::Property::encodeAttribute(Name);
writer.Stream() << writer.ind() << "<Constrain "
<< "Name=\"" << Name << "\" "
<< "Name=\"" << encodeName << "\" "
<< "Type=\"" << (int)Type << "\" ";
if(this->Type==InternalAlignment)
writer.Stream()