aboutsummaryrefslogtreecommitdiff
path: root/modules/gridmap
diff options
context:
space:
mode:
authorPoommetee Ketson2018-03-02 12:49:09 +0700
committerPoommetee Ketson2018-03-02 12:49:09 +0700
commit89323f94bb1b14f10beeee9c5b3268ce85e28114 (patch)
tree8769361b33e0b5e0b3c3b4e1c7bf16b90ae3be73 /modules/gridmap
parent08cadc3d871f681ef1f951894345359a85ba190e (diff)
downloadgodot-89323f94bb1b14f10beeee9c5b3268ce85e28114.tar.gz
godot-89323f94bb1b14f10beeee9c5b3268ce85e28114.tar.zst
godot-89323f94bb1b14f10beeee9c5b3268ce85e28114.zip
Diffstat (limited to 'modules/gridmap')
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 47837a247..e91c1ebd8 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -101,8 +101,8 @@ void GridMapEditor::_menu_option(int p_option) {
}
if (edit_axis != new_axis) {
- int item1 = options->get_popup()->get_item_id(MENU_OPTION_NEXT_LEVEL);
- int item2 = options->get_popup()->get_item_id(MENU_OPTION_PREV_LEVEL);
+ int item1 = options->get_popup()->get_item_index(MENU_OPTION_NEXT_LEVEL);
+ int item2 = options->get_popup()->get_item_index(MENU_OPTION_PREV_LEVEL);
if (edit_axis == Vector3::AXIS_Y) {
options->get_popup()->set_item_text(item1, TTR("Next Plane"));
options->get_popup()->set_item_text(item2, TTR("Previous Plane"));
@@ -779,7 +779,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
set_process(true);
- Vector3 edited_floor = p_gridmap->get_meta("_editor_floor_");
+ Vector3 edited_floor = p_gridmap->has_meta("_editor_floor_") ? p_gridmap->get_meta("_editor_floor_") : Variant();
clip_mode = p_gridmap->has_meta("_editor_clip_") ? ClipMode(p_gridmap->get_meta("_editor_clip_").operator int()) : CLIP_DISABLED;
for (int i = 0; i < 3; i++) {