You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Rename CanvasItem.update() to queue_redraw()
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
This commit is contained in:
@@ -197,7 +197,7 @@ void AnimationTrackEditAudio::_preview_changed(ObjectID p_which) {
|
||||
Ref<AudioStream> stream = object->call("get_stream");
|
||||
|
||||
if (stream.is_valid() && stream->get_instance_id() == p_which) {
|
||||
update();
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,7 +799,7 @@ void AnimationTrackEditTypeAudio::_preview_changed(ObjectID p_which) {
|
||||
for (int i = 0; i < get_animation()->track_get_key_count(get_track()); i++) {
|
||||
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), i);
|
||||
if (stream.is_valid() && stream->get_instance_id() == p_which) {
|
||||
update();
|
||||
queue_redraw();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1026,7 +1026,7 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
|
||||
get_undo_redo()->add_undo_method(get_animation().ptr(), "track_remove_key_at_time", get_track(), ofs);
|
||||
get_undo_redo()->commit_action();
|
||||
|
||||
update();
|
||||
queue_redraw();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1086,7 +1086,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
|
||||
if (len_resizing && mm.is_valid()) {
|
||||
len_resizing_rel += mm->get_relative().x;
|
||||
len_resizing_start = mm->is_shift_pressed();
|
||||
update();
|
||||
queue_redraw();
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
@@ -1097,7 +1097,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
|
||||
len_resizing_start = mb->is_shift_pressed();
|
||||
len_resizing_from_px = mb->get_position().x;
|
||||
len_resizing_rel = 0;
|
||||
update();
|
||||
queue_redraw();
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
@@ -1120,7 +1120,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
|
||||
len_resizing_index = -1;
|
||||
update();
|
||||
queue_redraw();
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user