Integrated paint guis while removing remains of oldPaint/double-click system.

This commit is contained in:
Tats
2014-10-16 17:52:32 +00:00
parent fc89b4fb11
commit eef76173b6
3 changed files with 21 additions and 23 deletions

View File

@@ -96,8 +96,7 @@ void ProjectReader::parsePaint(const QDomElement& paint)
QString x = paint.firstChildElement("x").text();
QString y = paint.firstChildElement("y").text();
uid id = _window->createMediaPaint(paintAttrId.toInt(), uri, x.toFloat(), y.toFloat(),
std::tr1::shared_ptr<Paint>(static_cast<Paint*>(0)), paintAttrType == "image");
uid id = _window->createMediaPaint(paintAttrId.toInt(), uri, x.toFloat(), y.toFloat(), paintAttrType == "image");
if (id == NULL_UID)
_xml.raiseError(QObject::tr("Cannot create media with uri %1.").arg(uri));
}
@@ -106,7 +105,7 @@ void ProjectReader::parsePaint(const QDomElement& paint)
QString rgb = paint.firstChildElement("rgb").text();
QColor color(rgb);
uid id = _window->createColorPaint(paintAttrId.toInt(), color, std::tr1::shared_ptr<Paint>(static_cast<Paint*>(0)));
uid id = _window->createColorPaint(paintAttrId.toInt(), color);
if (id == NULL_UID)
_xml.raiseError(QObject::tr("Cannot create color with RGB hex code %1.").arg(rgb));