Fixed delay loading of dynamic FCOIS symbols. Editing the dynamic symbols in FCOIS should work, too.
willneedit [11-21-20 - 00:49]
Fixed delay loading of dynamic FCOIS symbols. Editing the dynamic symbols in FCOIS should work, too.
diff --git a/FCOISLink.lua b/FCOISLink.lua
index ed76912..c221e9e 100644
--- a/FCOISLink.lua
+++ b/FCOISLink.lua
@@ -1,6 +1,6 @@
local DEBUG =
--- function() end
-d
+function() end
+-- d
local function _tr(str)
return str
@@ -152,7 +152,7 @@ function FCOISL:IsNoMark(mark) return mark == I_NO_MARK end
function FCOISL:IsAnyMark(mark) return mark == I_ANY_MARK end
function FCOISL:GetIconChoices()
- if DIChoices then return DIChoices end
+-- if DIChoices then return DIChoices end
DIChoices = { TXT_NO_CARE, TXT_NO_MARK, TXT_ANY_MARK }
@@ -170,6 +170,7 @@ function FCOISL:GetIconChoices()
for index, dynamicIconNr in pairs(numberToDynamicIconNr) do
local dynIconName = FCOISL:GetIconText(dynamicIconNr)
DIChoices[#DIChoices + 1] = dynIconName
+ DEBUG(dynIconName)
end
return DIChoices
diff --git a/InventoryManager.lua b/InventoryManager.lua
index 6b9a56a..dff6cd7 100644
--- a/InventoryManager.lua
+++ b/InventoryManager.lua
@@ -141,6 +141,7 @@ end
function IM:OpenSettings()
self.LAM:OpenToPanel(self.UI.panel)
+ IM.UI.RuleEdit:UpdateFCOIcons()
end
function IM:help()
diff --git a/InventoryManager.txt b/InventoryManager.txt
index b7d3b99..7c36415 100644
--- a/InventoryManager.txt
+++ b/InventoryManager.txt
@@ -1,8 +1,8 @@
## Title: InventoryManager
-## APIVersion: 100030
+## APIVersion: 100033 100034
## DependsOn: LibAddonMenu-2.0
## SavedVariables: IMSavedVars
-## Version: 2.5.1
+## Version: 2.5.2
## Author: iwontsay & iFedix
## Description: Automatically stash, retrieve and dispose your items with custom rules!
diff --git a/UI/RuleEdit.lua b/UI/RuleEdit.lua
index acfcaaf..8ebb2f9 100644
--- a/UI/RuleEdit.lua
+++ b/UI/RuleEdit.lua
@@ -192,7 +192,7 @@ function RE:GetControls()
{
type = "checkbox",
name = GetString(IM_SET_NEGATE),
- tooltip = GetString(IM_SET_NEGATE_TT),
+ tooltip = GetString(IM_SET_NEGATE_TT),
width = "half",
getFunc = function() return RE.editingRule.negate end,
setFunc = function(value) RE.editingRule.negate = value end,
@@ -261,7 +261,8 @@ function RE:GetControls()
choices = IM.FCOISL:GetIconChoices(),
getFunc = function() return IM.FCOISL:GetIndexedMark(RE.editingRule.FCOISMark) end,
setFunc = function(value) RE.editingRule.FCOISMark = IM.FCOISL:GetMarkIndex(value) end,
- disabled = function() return not IM.FCOISL:hasAddon() and not IM.ISL:hasAddon() end
+ disabled = function() return not IM.FCOISL:hasAddon() and not IM.ISL:hasAddon() end,
+ reference = "IWONTSAY_IM_CHO_FCOIS_CHOICE"
},
{
type = "dropdown",
@@ -331,6 +332,14 @@ function RE:Update()
CALLBACK_MANAGER:FireCallbacks("LAM-RefreshPanel", RE.panel)
end
+function RE:UpdateFCOIcons()
+ if not IWONTSAY_IM_CHO_FCOIS_CHOICE then
+ zo_callLater(function() RE:UpdateFCOIcons() end, 500)
+ return
+ end
+ IWONTSAY_IM_CHO_FCOIS_CHOICE:UpdateChoices(IM.FCOISL:GetIconChoices());
+end
+
function RE:BtnAddBeforeClicked()
DEBUG("--- OnBtnAddBefore")
local rs = IM.currentRuleset:GetRuleList(RE.selectedAction)