diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index 664ff0961..6f8c3b9c6 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -12,6 +12,8 @@ Version 346 ??? --Object editor preserves use vanish when inserting an object. +--Category editor preserves index, if possible, when switching categories. + Server Fixes diff --git a/gameSource/EditorCategoryPage.cpp b/gameSource/EditorCategoryPage.cpp index 07a838fa6..7186abb3d 100644 --- a/gameSource/EditorCategoryPage.cpp +++ b/gameSource/EditorCategoryPage.cpp @@ -177,7 +177,18 @@ void EditorCategoryPage::actionPerformed( GUIComponent *inTarget ) { } else { mCurrentCategory = parentID; - mSelectionIndex = 0; + + if( mCurrentCategory != -1 ) { + int newMax = + getCategory( mCurrentCategory )->objectIDSet.size() - 1; + + if( newMax < mSelectionIndex ) { + mSelectionIndex = 0; + } + } + else { + mSelectionIndex = 0; + } } updateCheckbox(); }