diff --git a/Editor/EditorItems.cpp b/Editor/EditorItems.cpp index f5d39d26..feb8cdb9 100644 --- a/Editor/EditorItems.cpp +++ b/Editor/EditorItems.cpp @@ -1136,6 +1136,7 @@ void DeleteSelectedItem() SpecifyItemToEdit( &gWorldItems[ gpItemPool->pNext->iItemIndex ].object, gpItemPool->sGridNo ); } sGridNo = gpItemPool->sGridNo; + //remove the item if( gWorldItems[ gpItemPool->iItemIndex ].object.usItem == ACTION_ITEM ) { @@ -1148,8 +1149,13 @@ void DeleteSelectedItem() gpEditingItemPool = NULL; RemoveItemFromPool( sGridNo, gpItemPool->iItemIndex, 0 ); gpItemPool = NULL; + //determine if there are still any items at this location - if( !GetItemPoolFromGround( sGridNo, &gpItemPool ) ) + if( GetItemPoolFromGround( sGridNo, &gpItemPool ) ) + { //reset display for remaining items + SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo ); + } + else { //no items left, so remove the node from the list. IPListNode *pIPPrev, *pIPCurr; pIPCurr = pIPHead; diff --git a/Editor/Item Statistics.cpp b/Editor/Item Statistics.cpp index 29a52b11..b437fe79 100644 --- a/Editor/Item Statistics.cpp +++ b/Editor/Item Statistics.cpp @@ -398,8 +398,7 @@ void ExecuteItemStatsCmd( /*UINT8*/ UINT16 ubAction ) case ITEMSTATS_DEFAULT: break; case ITEMSTATS_DELETE: - if( gbEditingMode != EDITING_NOTHING ) - DeleteSelectedItem(); + DeleteSelectedItem(); break; case ITEMSTATS_SHOW: ShowSelectedItem(); diff --git a/Editor/editscreen.cpp b/Editor/editscreen.cpp index e551ad04..5a7e5ff2 100644 --- a/Editor/editscreen.cpp +++ b/Editor/editscreen.cpp @@ -1506,7 +1506,7 @@ void HandleKeyboardShortcuts( ) break; case DEL: - if( iCurrentTaskbar == TASK_ITEMS && gbEditingMode != 0 ) //gbEditingMode != EDITING_NOTHING + if( iCurrentTaskbar == TASK_ITEMS ) DeleteSelectedItem(); else if( gsSelectedMercID != -1 ) {