瀏覽代碼

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.
Areloch 8 年之前
父節點
當前提交
2db03e47e9

+ 3 - 0
Engine/source/forest/editor/forestSelectionTool.cpp

@@ -197,6 +197,9 @@ void ForestSelectionTool::_selectItem( const ForestItem &item )
 
 
 void ForestSelectionTool::deleteSelection()
 void ForestSelectionTool::deleteSelection()
 {
 {
+   if (!mEditor)
+      return;
+
    ForestDeleteUndoAction *action = new ForestDeleteUndoAction( mForest->getData(), mEditor );
    ForestDeleteUndoAction *action = new ForestDeleteUndoAction( mForest->getData(), mEditor );
 
 
    for ( U32 i=0; i < mSelection.size(); i++ )
    for ( U32 i=0; i < mSelection.size(); i++ )

+ 1 - 1
Templates/Empty/game/tools/forestEditor/forestEditorGui.gui

@@ -252,7 +252,7 @@
                   objectNamesOnly = "1";
                   objectNamesOnly = "1";
                   useInspectorTooltips = "0";
                   useInspectorTooltips = "0";
                   tooltipOnWidthOnly = "0";
                   tooltipOnWidthOnly = "0";
-                  compareToObjectID = "1";
+                  compareToObjectID = "0";
                   canRenameObjects = "1";
                   canRenameObjects = "1";
                   renameInternal = "0";
                   renameInternal = "0";
                   isContainer = "1";
                   isContainer = "1";

+ 1 - 1
Templates/Full/game/tools/forestEditor/forestEditorGui.gui

@@ -252,7 +252,7 @@
                   objectNamesOnly = "1";
                   objectNamesOnly = "1";
                   useInspectorTooltips = "0";
                   useInspectorTooltips = "0";
                   tooltipOnWidthOnly = "0";
                   tooltipOnWidthOnly = "0";
-                  compareToObjectID = "1";
+                  compareToObjectID = "0";
                   canRenameObjects = "1";
                   canRenameObjects = "1";
                   renameInternal = "0";
                   renameInternal = "0";
                   isContainer = "1";
                   isContainer = "1";