File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -204,4 +204,6 @@ v0.9.1 (WIP):
204
204
205
205
BUGFIX: Application: Recreate DX11 resources lazily (related to #162)
206
206
207
- BUGFIX: Editor: Don't steal input from active user widget (#172)
207
+ BUGFIX: Editor: Don't steal input from active user widget (#172)
208
+
209
+ BUGFIX: Editor: Delete item from internal list only when action accepts (#178)
Original file line number Diff line number Diff line change @@ -5081,13 +5081,12 @@ void ed::DeleteItemsAction::RejectItem()
5081
5081
5082
5082
m_UserAction = Rejected;
5083
5083
5084
- RemoveItem ( false );
5084
+ DropCurrentItem ( );
5085
5085
}
5086
5086
5087
5087
void ed::DeleteItemsAction::RemoveItem (bool deleteDependencies)
5088
5088
{
5089
- auto item = m_CandidateObjects[m_CandidateItemIndex];
5090
- m_CandidateObjects.erase (m_CandidateObjects.begin () + m_CandidateItemIndex);
5089
+ auto item = DropCurrentItem ();
5091
5090
5092
5091
Editor->DeselectObject (item);
5093
5092
@@ -5106,6 +5105,14 @@ void ed::DeleteItemsAction::RemoveItem(bool deleteDependencies)
5106
5105
Editor->NotifyLinkDeleted (item->AsLink ());
5107
5106
}
5108
5107
5108
+ ed::Object* ed::DeleteItemsAction::DropCurrentItem ()
5109
+ {
5110
+ auto item = m_CandidateObjects[m_CandidateItemIndex];
5111
+ m_CandidateObjects.erase (m_CandidateObjects.begin () + m_CandidateItemIndex);
5112
+
5113
+ return item;
5114
+ }
5115
+
5109
5116
5110
5117
5111
5118
Original file line number Diff line number Diff line change @@ -1156,6 +1156,7 @@ struct DeleteItemsAction final: EditorAction
1156
1156
1157
1157
bool QueryItem (ObjectId* itemId, IteratorType itemType);
1158
1158
void RemoveItem (bool deleteDependencies);
1159
+ Object* DropCurrentItem ();
1159
1160
1160
1161
vector<Object*> m_ManuallyDeletedObjects;
1161
1162
You can’t perform that action at this time.
0 commit comments