Merge pull request #17167 from Noshyaar/plane

GridMap: fix next/prev plane text, fix meta not found
This commit is contained in:
Rémi Verschelde 2018-03-02 11:07:06 +01:00 committed by GitHub
commit c8d2bb24fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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++) {