summaryrefslogtreecommitdiffstats
path: root/scene/2d/sprite.h
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2019-09-25 20:48:48 +0200
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2019-10-05 17:32:46 +0200
commitc7834ee5663c1169ba49445a5f9b9c4baf6b7489 (patch)
tree40231dc04b76dcffec60c92178d45c034d4ab186 /scene/2d/sprite.h
parent0ea54eeb0672c405d7ad0edf8444f0d86158f8b6 (diff)
downloadredot-engine-c7834ee5663c1169ba49445a5f9b9c4baf6b7489.tar.gz
Update TextureRect and Sprite when their Texture is modified directly.
Modified Sprite to use "changed" signal instead of _changed_callback to make it work when tool is disabled (change receptors are editor only). Fixes #32349
Diffstat (limited to 'scene/2d/sprite.h')
-rw-r--r--scene/2d/sprite.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/sprite.h b/scene/2d/sprite.h
index 5e6717a3f5..d3c0112e62 100644
--- a/scene/2d/sprite.h
+++ b/scene/2d/sprite.h
@@ -57,6 +57,8 @@ class Sprite : public Node2D {
void _get_rects(Rect2 &r_src_rect, Rect2 &r_dst_rect, bool &r_filter_clip) const;
+ void _texture_changed();
+
protected:
void _notification(int p_what);
@@ -64,8 +66,6 @@ protected:
virtual void _validate_property(PropertyInfo &property) const;
- virtual void _changed_callback(Object *p_changed, const char *p_prop);
-
public:
virtual Dictionary _edit_get_state() const;
virtual void _edit_set_state(const Dictionary &p_state);