From c5e94ad9de4ee217258c34410f9264c76540bb2c Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sun, 12 Nov 2023 01:41:51 +0800 Subject: [PATCH] Fix texture region editor not selecting restored snap mode (cherry picked from commit 64fb22e17bafc3cf1d220b0338c15643c564a78a) --- editor/plugins/texture_region_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index f2e650a604f..4ed650e47a8 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -1099,7 +1099,7 @@ TextureRegionEditor::TextureRegionEditor() { snap_mode_button->add_item(TTR("Pixel Snap"), 1); snap_mode_button->add_item(TTR("Grid Snap"), 2); snap_mode_button->add_item(TTR("Auto Slice"), 3); - snap_mode_button->select(0); + snap_mode_button->select(snap_mode); snap_mode_button->connect("item_selected", callable_mp(this, &TextureRegionEditor::_set_snap_mode)); hb_grid = memnew(HBoxContainer);