Skip to content

Commit 734bd3c

Browse files
committed
Merge pull request #89434 from jsjtxietian/center-view
Fix center view button appears outside the GenericTilePolygonEditor
2 parents d30aa4b + f59c147 commit 734bd3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

editor/plugins/tiles/tile_data_editors.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,10 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
946946

947947
button_center_view = memnew(Button);
948948
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
949+
button_center_view->set_grow_direction_preset(Control::PRESET_TOP_RIGHT);
949950
button_center_view->connect("pressed", callable_mp(this, &GenericTilePolygonEditor::_center_view));
950951
button_center_view->set_theme_type_variation("FlatButton");
952+
button_center_view->set_tooltip_text(TTR("Center View"));
951953
button_center_view->set_disabled(true);
952954
root->add_child(button_center_view);
953955

0 commit comments

Comments
 (0)