summaryrefslogtreecommitdiff
path: root/scene/2d/node_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/node_2d.cpp')
-rw-r--r--scene/2d/node_2d.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 95a1cbfce3..95e24505be 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -46,10 +46,9 @@ Dictionary Node2D::_edit_get_state() const {
}
void Node2D::_edit_set_state(const Dictionary &p_state) {
- Dictionary state = p_state;
- pos = state["position"];
- angle = state["rotation"];
- _scale = state["scale"];
+ pos = p_state["position"];
+ angle = p_state["rotation"];
+ _scale = p_state["scale"];
_update_transform();
_change_notify("rotation");
@@ -60,6 +59,8 @@ void Node2D::_edit_set_state(const Dictionary &p_state) {
void Node2D::_edit_set_position(const Point2 &p_position) {
pos = p_position;
+ _update_transform();
+ _change_notify("position");
}
Point2 Node2D::_edit_get_position() const {