From 2db03e47e98e7dc1adf1ec0240f2dcadcb8505ec Mon Sep 17 00:00:00 2001 From: Areloch Date: Sat, 4 Feb 2017 22:45:49 -0600 Subject: [PATCH] Fixes a crash when you try to delete things without being in selection mode in the forest editor. Adds a sanity check that everything is properly set up before attempting the delete action. Also adds a fix to the mesh item tab in the forest editor to correct odd selection behavior that could erroneously cause selection of two items in the list when you only clicked one. --- Engine/source/forest/editor/forestSelectionTool.cpp | 3 +++ Templates/Empty/game/tools/forestEditor/forestEditorGui.gui | 2 +- Templates/Full/game/tools/forestEditor/forestEditorGui.gui | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Engine/source/forest/editor/forestSelectionTool.cpp b/Engine/source/forest/editor/forestSelectionTool.cpp index a01c6cf86e..3d3e9d0229 100644 --- a/Engine/source/forest/editor/forestSelectionTool.cpp +++ b/Engine/source/forest/editor/forestSelectionTool.cpp @@ -197,6 +197,9 @@ void ForestSelectionTool::_selectItem( const ForestItem &item ) void ForestSelectionTool::deleteSelection() { + if (!mEditor) + return; + ForestDeleteUndoAction *action = new ForestDeleteUndoAction( mForest->getData(), mEditor ); for ( U32 i=0; i < mSelection.size(); i++ ) diff --git a/Templates/Empty/game/tools/forestEditor/forestEditorGui.gui b/Templates/Empty/game/tools/forestEditor/forestEditorGui.gui index ca40147bfe..e46a09f3d8 100644 --- a/Templates/Empty/game/tools/forestEditor/forestEditorGui.gui +++ b/Templates/Empty/game/tools/forestEditor/forestEditorGui.gui @@ -252,7 +252,7 @@ objectNamesOnly = "1"; useInspectorTooltips = "0"; tooltipOnWidthOnly = "0"; - compareToObjectID = "1"; + compareToObjectID = "0"; canRenameObjects = "1"; renameInternal = "0"; isContainer = "1"; diff --git a/Templates/Full/game/tools/forestEditor/forestEditorGui.gui b/Templates/Full/game/tools/forestEditor/forestEditorGui.gui index ca40147bfe..e46a09f3d8 100644 --- a/Templates/Full/game/tools/forestEditor/forestEditorGui.gui +++ b/Templates/Full/game/tools/forestEditor/forestEditorGui.gui @@ -252,7 +252,7 @@ objectNamesOnly = "1"; useInspectorTooltips = "0"; tooltipOnWidthOnly = "0"; - compareToObjectID = "1"; + compareToObjectID = "0"; canRenameObjects = "1"; renameInternal = "0"; isContainer = "1";