From 3c055b78d39d613ade54f0934dd4162be6d259b3 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Mon, 2 Nov 2015 18:55:21 -0500 Subject: [PATCH] Fix clearing of all overrides --- gui/propertyEditor.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gui/propertyEditor.py b/gui/propertyEditor.py index 44c63307b..406007eb3 100644 --- a/gui/propertyEditor.py +++ b/gui/propertyEditor.py @@ -124,7 +124,15 @@ class AttributeEditor( wx.Frame ): "Confirm Delete", wx.YES | wx.NO | wx.ICON_EXCLAMATION) if dlg.ShowModal() == wx.ID_YES: - eos.db.clearOverrides() + sMkt = service.Market.getInstance() + items = sMkt.getItemsWithOverrides() + # We can't just delete overrides, as loaded items will still have + # them assigned. Deleting them from the database won't propagate + # them due to the eve/user database disconnect. We must loop through + # all items that have overrides and remove them + for item in items: + for _, x in item.overrides.items(): + item.deleteOverride(x.attr) self.itemView.updateItems(True) self.pg.Clear()