Ver Fonte

Properly update frame range after modifying the vframe/hframes, closes #7624

(cherry picked from commit e47ecc63ef50cfebe7ef141fc797637c9f875028)
Juan Linietsky há 8 anos atrás
pai
commit
61b43492a0
2 ficheiros alterados com 4 adições e 4 exclusões
  1. 2 2
      scene/2d/sprite.cpp
  2. 2 2
      scene/3d/sprite_3d.cpp

+ 2 - 2
scene/2d/sprite.cpp

@@ -225,7 +225,7 @@ void Sprite::set_vframes(int p_amount) {
 	vframes = p_amount;
 	vframes = p_amount;
 	update();
 	update();
 	item_rect_changed();
 	item_rect_changed();
-	_change_notify("frame");
+	_change_notify();
 }
 }
 int Sprite::get_vframes() const {
 int Sprite::get_vframes() const {
 
 
@@ -238,7 +238,7 @@ void Sprite::set_hframes(int p_amount) {
 	hframes = p_amount;
 	hframes = p_amount;
 	update();
 	update();
 	item_rect_changed();
 	item_rect_changed();
-	_change_notify("frame");
+	_change_notify();
 }
 }
 int Sprite::get_hframes() const {
 int Sprite::get_hframes() const {
 
 

+ 2 - 2
scene/3d/sprite_3d.cpp

@@ -501,7 +501,7 @@ void Sprite3D::set_vframes(int p_amount) {
 	ERR_FAIL_COND(p_amount < 1);
 	ERR_FAIL_COND(p_amount < 1);
 	vframes = p_amount;
 	vframes = p_amount;
 	_queue_update();
 	_queue_update();
-	_change_notify("frame");
+	_change_notify();
 }
 }
 int Sprite3D::get_vframes() const {
 int Sprite3D::get_vframes() const {
 
 
@@ -513,7 +513,7 @@ void Sprite3D::set_hframes(int p_amount) {
 	ERR_FAIL_COND(p_amount < 1);
 	ERR_FAIL_COND(p_amount < 1);
 	hframes = p_amount;
 	hframes = p_amount;
 	_queue_update();
 	_queue_update();
-	_change_notify("frame");
+	_change_notify();
 }
 }
 int Sprite3D::get_hframes() const {
 int Sprite3D::get_hframes() const {