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:
Micky 2022-08-13 23:21:24 +02:00
parent e60086f98b
commit e31bb5ffeb
111 changed files with 1354 additions and 1354 deletions

View file

@ -87,7 +87,7 @@ void CurveEditor::set_curve(Ref<Curve> curve) {
_hover_point = -1;
_selected_tangent = TANGENT_NONE;
update();
queue_redraw();
// Note: if you edit a curve, then set another, and try to undo,
// it will normally apply on the previous curve, but you won't see it
@ -311,7 +311,7 @@ void CurveEditor::on_preset_item_selected(int preset_id) {
}
void CurveEditor::_curve_changed() {
update();
queue_redraw();
// Point count can change in case of undo
if (_selected_point >= _curve_ref->get_point_count()) {
set_selected_point(-1);
@ -512,14 +512,14 @@ void CurveEditor::toggle_linear(TangentIndex tangent) {
void CurveEditor::set_selected_point(int index) {
if (index != _selected_point) {
_selected_point = index;
update();
queue_redraw();
}
}
void CurveEditor::set_hover_point_index(int index) {
if (index != _hover_point) {
_hover_point = index;
update();
queue_redraw();
}
}