Skip to content

Commit

Permalink
Merge pull request #64188 from YeldhamDev/gridmap_item_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Aug 10, 2022
2 parents edf07ee + fe16aec commit 6b84619
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/gridmap/editor/grid_map_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,10 +896,12 @@ void GridMapEditor::update_palette() {
}

if (selected != -1 && mesh_library_palette->get_item_count() > 0) {
mesh_library_palette->select(selected);
// Make sure that this variable is set correctly.
selected_palette = MIN(selected, mesh_library_palette->get_item_count() - 1);
mesh_library_palette->select(selected_palette);
}

last_mesh_library = mesh_library.operator->();
last_mesh_library = *mesh_library;
}

void GridMapEditor::edit(GridMap *p_gridmap) {
Expand Down

0 comments on commit 6b84619

Please sign in to comment.