From 483afb9fb42c6a41049a045f5d38e99419fa8542 Mon Sep 17 00:00:00 2001 From: karlis <2995621482@qq.com> Date: Thu, 23 Mar 2023 11:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3flip=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp b/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp index fae4f30..9289788 100644 --- a/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp +++ b/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp @@ -47,6 +47,7 @@ LayerWrapper::LayerWrapper(QJsonObject json, FolderLayerWrapper*parent, ElementM transformJson.value("scale").toObject().value("y").toDouble()}; property.rotation = {transformJson.value("rotation").toDouble()}; property.flipX = { transformJson.value("flipX").toBool() }; + qDebug() << property.flipX; property.flipY = { transformJson.value("flipY").toBool() }; selected = false; hidden = false; @@ -262,8 +263,8 @@ QJsonObject LayerWrapper::toJson() const QJsonObject transformJson; transformJson.insert("offset", QJsonObject({ {"x", property.offset.x()}, {"y", property.offset.y()} })); transformJson.insert("scale", QJsonObject({ {"x", property.scale.x()}, {"y", property.scale.y()} })); - transformJson.insert("filpX", property.flipX); - transformJson.insert("filpY", property.flipY); + transformJson.insert("flipX", property.flipX); + transformJson.insert("flipY", property.flipY); transformJson.insert("rotation", property.rotation); json.insert("transform", transformJson); return json;