1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Fix TextureRegionEditor::_pan_callback deferred called with only one arg

This commit is contained in:
jsjtxietian
2024-01-31 12:36:23 +08:00
parent 6fea273ed3
commit d06c526fb0

View File

@@ -226,8 +226,8 @@ void TextureRegionEditor::_texture_overlay_draw() {
hscroll->set_value((hscroll->get_min() + hscroll->get_max() - hscroll->get_page()) / 2);
vscroll->set_value((vscroll->get_min() + vscroll->get_max() - vscroll->get_page()) / 2);
// This ensures that the view is updated correctly.
callable_mp(this, &TextureRegionEditor::_pan_callback).bind(Vector2(1, 0)).call_deferred();
callable_mp(this, &TextureRegionEditor::_scroll_changed).bind(0.0).call_deferred();
callable_mp(this, &TextureRegionEditor::_pan_callback).call_deferred(Vector2(1, 0), Ref<InputEvent>());
callable_mp(this, &TextureRegionEditor::_scroll_changed).call_deferred(0.0);
request_center = false;
}