You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix error when switching to another GridMap with an item with higher index selected
(cherry picked from commit fe16aecbac)
This commit is contained in:
committed by
Rémi Verschelde
parent
09fb05bc05
commit
b808923b54
@@ -904,10 +904,12 @@ void GridMapEditor::update_palette() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (selected != -1 && mesh_library_palette->get_item_count() > 0) {
|
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) {
|
void GridMapEditor::edit(GridMap *p_gridmap) {
|
||||||
|
|||||||
Reference in New Issue
Block a user