Skip to content

Commit

Permalink
Fixes a crash when you try to delete things without being in selectio…
Browse files Browse the repository at this point in the history
…n 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.
  • Loading branch information
Areloch committed Feb 5, 2017
1 parent 3717e3b commit 2db03e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Engine/source/forest/editor/forestSelectionTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
objectNamesOnly = "1";
useInspectorTooltips = "0";
tooltipOnWidthOnly = "0";
compareToObjectID = "1";
compareToObjectID = "0";
canRenameObjects = "1";
renameInternal = "0";
isContainer = "1";
Expand Down
2 changes: 1 addition & 1 deletion Templates/Full/game/tools/forestEditor/forestEditorGui.gui
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
objectNamesOnly = "1";
useInspectorTooltips = "0";
tooltipOnWidthOnly = "0";
compareToObjectID = "1";
compareToObjectID = "0";
canRenameObjects = "1";
renameInternal = "0";
isContainer = "1";
Expand Down

0 comments on commit 2db03e4

Please sign in to comment.