summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-08-23 12:29:33 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-08-23 12:29:33 -0300
commit398c1c1c0c5c0380f39403b384e4d798ccf7fb75 (patch)
tree052c63e593b92cc8ebd0874ac9339dd723d73e32 /scene
parent634673cf5b900e36925ef0c6cea9ce572b83de2e (diff)
Fix transform not being applied properly after toggling remote node, fixes #17671
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/remote_transform_2d.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index ea59a6790d..f0274e5206 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -131,8 +131,10 @@ void RemoteTransform2D::_notification(int p_what) {
void RemoteTransform2D::set_remote_node(const NodePath &p_remote_node) {
remote_node = p_remote_node;
- if (is_inside_tree())
+ if (is_inside_tree()) {
_update_cache();
+ _update_remote();
+ }
update_configuration_warning();
}
@@ -144,6 +146,7 @@ NodePath RemoteTransform2D::get_remote_node() const {
void RemoteTransform2D::set_use_global_coordinates(const bool p_enable) {
use_global_coordinates = p_enable;
+ _update_remote();
}
bool RemoteTransform2D::get_use_global_coordinates() const {