Fix incorrect grid floor position before input in the GridMap editor

This commit is contained in:
Michael Alexsander
2026-05-04 20:47:42 -03:00
parent c3284cd696
commit e36a8e266a
2 changed files with 1 additions and 12 deletions
@@ -60,14 +60,6 @@
#include "scene/main/window.h"
#include "servers/rendering/rendering_server.h"
void GridMapEditor::_configure() {
if (!node) {
return;
}
update_grid();
}
void GridMapEditor::_menu_option(int p_option) {
switch (p_option) {
case MENU_OPTION_PREV_LEVEL: {
@@ -1253,8 +1245,7 @@ void GridMapEditor::update_grid() {
grid_ofs[edit_axis] = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
// If there's a valid tile cursor, offset the grid, otherwise move it back to the node.
edit_grid_xform.origin = cursor_instance.is_valid() ? grid_ofs : Vector3();
edit_grid_xform.origin = grid_ofs;
edit_grid_xform.basis = Basis();
for (int i = 0; i < 3; i++) {
@@ -1487,7 +1478,6 @@ void GridMapEditor::_floor_mouse_exited() {
}
void GridMapEditor::_bind_methods() {
ClassDB::bind_method("_configure", &GridMapEditor::_configure);
ClassDB::bind_method("_set_selection", &GridMapEditor::_set_selection);
ADD_SIGNAL(MethodInfo("overlay_update_requested"));