From 109c5572fbea0bc2e9bdbf2b1319d3e4b7f280dd Mon Sep 17 00:00:00 2001 From: carlesgutierrez Date: Tue, 17 Oct 2017 16:47:34 +0200 Subject: [PATCH] Loading Mapping --> setPaint was commented. Seems to be necesary. Also added related Label for paintId just including ProjectLabels.h --- src/core/Mapping.cpp | 4 ++-- src/core/Mapping.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/Mapping.cpp b/src/core/Mapping.cpp index a57b57e..95c5139 100644 --- a/src/core/Mapping.cpp +++ b/src/core/Mapping.cpp @@ -91,8 +91,8 @@ void Mapping::read(const QDomElement& obj) Element::read(obj); // Read paint. - int paintId = obj.attribute("paintId").toInt(); -// setPaint(MainWindow::window()->getMappingManager().getPaintById(paintId)); + int paintId = obj.attribute(ProjectLabels::PAINT_ID).toInt(); + setPaint(MainWindow::window()->getMappingManager().getPaintById(paintId)); // Read output shape. _readShape(obj, true); diff --git a/src/core/Mapping.h b/src/core/Mapping.h index 09b9817..94298e7 100644 --- a/src/core/Mapping.h +++ b/src/core/Mapping.h @@ -33,6 +33,8 @@ #include "MetaObjectRegistry.h" +#include "ProjectLabels.h" + namespace mmp { // TODO: replace by ProjectAttribute