Browse Source

Merge pull request #8248 from Hinsbart/fix_notify_renames

Fix more property names in _change_notify calls.
Rémi Verschelde 8 năm trước cách đây
mục cha
commit
4d3ed11212

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

@@ -206,7 +206,7 @@ void CanvasItem::show() {
 		return;
 
 	_propagate_visibility_changed(true);
-	_change_notify("visibility/visible");
+	_change_notify("visible");
 }
 
 void CanvasItem::hide() {
@@ -221,7 +221,7 @@ void CanvasItem::hide() {
 		return;
 
 	_propagate_visibility_changed(false);
-	_change_notify("visibility/visible");
+	_change_notify("visible");
 }
 
 Variant CanvasItem::edit_get_state() const {

+ 5 - 4
scene/3d/spatial.cpp

@@ -220,9 +220,10 @@ void Spatial::set_transform(const Transform &p_transform) {
 
 	data.local_transform = p_transform;
 	data.dirty |= DIRTY_VECTORS;
-	_change_notify("transform/translation");
-	_change_notify("transform/rotation");
-	_change_notify("transform/scale");
+	_change_notify("translation");
+	_change_notify("rotation");
+	_change_notify("rotation_deg");
+	_change_notify("scale");
 	_propagate_transform_changed(this);
 	if (data.notify_local_transform) {
 		notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
@@ -525,7 +526,7 @@ void Spatial::_propagate_visibility_changed() {
 
 	notification(NOTIFICATION_VISIBILITY_CHANGED);
 	emit_signal(SceneStringNames::get_singleton()->visibility_changed);
-	_change_notify("visibility/visible");
+	_change_notify("visible");
 #ifdef TOOLS_ENABLED
 	if (data.gizmo.is_valid())
 		_update_gizmo();

+ 1 - 1
scene/gui/control.cpp

@@ -2158,7 +2158,7 @@ void Control::set_rotation(float p_radians) {
 	data.rotation = p_radians;
 	update();
 	_notify_transform();
-	_change_notify("rect/rotation");
+	_change_notify("rect_rotation");
 }
 
 float Control::get_rotation() const {

+ 4 - 4
scene/gui/patch_9_rect.cpp

@@ -102,16 +102,16 @@ void NinePatchRect::set_patch_margin(Margin p_margin, int p_size) {
 	minimum_size_changed();
 	switch (p_margin) {
 		case MARGIN_LEFT:
-			_change_notify("patch_margin/left");
+			_change_notify("patch_margin_left");
 			break;
 		case MARGIN_TOP:
-			_change_notify("patch_margin/top");
+			_change_notify("patch_margin_top");
 			break;
 		case MARGIN_RIGHT:
-			_change_notify("patch_margin/right");
+			_change_notify("patch_margin_right");
 			break;
 		case MARGIN_BOTTOM:
-			_change_notify("patch_margin/bottom");
+			_change_notify("patch_margin_bottom");
 			break;
 	}
 }

+ 5 - 5
scene/gui/range.cpp

@@ -33,7 +33,7 @@ void Range::_value_changed_notify() {
 	_value_changed(shared->val);
 	emit_signal("value_changed", shared->val);
 	update();
-	_change_notify("range/value");
+	_change_notify("value");
 }
 
 void Range::Shared::emit_value_changed() {
@@ -87,26 +87,26 @@ void Range::set_min(double p_min) {
 	shared->min = p_min;
 	set_value(shared->val);
 
-	shared->emit_changed("range/min");
+	shared->emit_changed("min");
 }
 void Range::set_max(double p_max) {
 
 	shared->max = p_max;
 	set_value(shared->val);
 
-	shared->emit_changed("range/max");
+	shared->emit_changed("max");
 }
 void Range::set_step(double p_step) {
 
 	shared->step = p_step;
-	shared->emit_changed("range/step");
+	shared->emit_changed("step");
 }
 void Range::set_page(double p_page) {
 
 	shared->page = p_page;
 	set_value(shared->val);
 
-	shared->emit_changed("range/page");
+	shared->emit_changed("page");
 }
 
 double Range::get_value() const {

+ 1 - 1
scene/gui/split_container.cpp

@@ -185,7 +185,7 @@ void SplitContainer::_resort() {
 	}
 
 	update();
-	_change_notify("split/offset");
+	_change_notify("split_offset");
 }
 
 Size2 SplitContainer::get_minimum_size() const {