From 894231b0091270d04061bae4f608cebfee63d5c5 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 18 Mar 2019 19:40:30 +0300 Subject: [PATCH] Change selection affix --- gui/builtinContextMenus/spoolUp.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gui/builtinContextMenus/spoolUp.py b/gui/builtinContextMenus/spoolUp.py index a4f6a8ada..5c7347ef5 100644 --- a/gui/builtinContextMenus/spoolUp.py +++ b/gui/builtinContextMenus/spoolUp.py @@ -33,14 +33,20 @@ class SpoolUp(ContextMenu): def getSubMenu(self, context, selection, rootMenu, i, pitem): m = wx.Menu() + isNotDefault = self.mod.spoolType is not None and self.mod.spoolAmount is not None + cycleDefault = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, eos.config.settings['globalDefaultSpoolupPercentage'], True))[0] cycleCurrent = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, eos.config.settings['globalDefaultSpoolupPercentage'], False))[0] cycleMin = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, 0, True))[0] cycleMax = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, 1, True))[0] for cycle in range(cycleMin, cycleMax + 1): menuId = ContextMenu.nextID() - if cycleCurrent == cycle: - text = "- {} -".format(cycle) + # Show selected only for current value and when overriden by user + if isNotDefault and cycle == cycleCurrent: + text = "{} (selected)".format(cycle) + # Show default only for current value and when not overriden + elif not isNotDefault and cycle == cycleDefault: + text = "{} (default)".format(cycle) else: text = "{}".format(cycle) item = wx.MenuItem(m, menuId, text)