Skip to content

Commit

Permalink
Merge pull request #87771 from jsjtxietian/region-mismatch
Browse files Browse the repository at this point in the history
Fix `TextureRegionEditor::_pan_callback` deferred called with only one argument
  • Loading branch information
akien-mga committed Feb 5, 2024
2 parents 07655a0 + d06c526 commit 474d9b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/plugins/texture_region_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 474d9b7

Please sign in to comment.