mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Statesaving of color paints / mappings
This commit is contained in:
@@ -78,6 +78,14 @@ void ProjectWriter::writeItem(Paint *item)
|
||||
_xml.writeEndElement();
|
||||
//_xml.writeEmptyElement("hello");
|
||||
}
|
||||
else if (item->getType() == "color")
|
||||
{
|
||||
// FIXME: check paint type before casting to Image
|
||||
Color *color = (Color *) item;
|
||||
|
||||
_xml.writeTextElement("rgb", color->getColor().name());
|
||||
_xml.writeEndElement();
|
||||
}
|
||||
else
|
||||
qDebug() << "Unknown type, cannot save: " << item->getType() << endl;
|
||||
}
|
||||
@@ -128,6 +136,10 @@ void ProjectWriter::writeItem(Mapping *item)
|
||||
|
||||
_xml.writeEndElement(); // mapping
|
||||
}
|
||||
else if (item->getType().endsWith("_color"))
|
||||
{
|
||||
_xml.writeEndElement(); // mapping
|
||||
}
|
||||
else
|
||||
qDebug() << "Unknown type, cannot save: " << item->getType() << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user