Skip to content

Commit 1c2b37b

Browse files
committed
Delete attacker attachment from model if attacker removed from GUI
1 parent ed6b5b9 commit 1c2b37b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mal_gui/undo_redo_commands/delete_command.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def redo(self):
3434
self.scene.removeItem(item)
3535
if hasattr(item, 'asset'):
3636
self.scene.model.remove_asset(item.asset)
37+
if hasattr(item, 'attackerAttachment'):
38+
self.scene.model.remove_attacker(item.attackerAttachment)
3739

3840
#Update the Object Explorer when number of items change
3941
self.scene.main_window.update_childs_in_object_explorer_signal.emit()

0 commit comments

Comments
 (0)