fixed a coldharbour crash and idk what the other changes are

git [06-24-18 - 17:39]
fixed a coldharbour crash and idk what the other changes are
Filename
.gitignore
IIfA/IIfABackpack.lua
IIfA/IIfADataCollection.lua
IIfA/IIfAEvents.lua
IIfA/IIfASceneFuncs.lua
IIfA/IIfASettingsAdapter.lua
IIfA/IIfA_xml_adapter.lua
diff --git a/.gitignore b/.gitignore
index 3fa3560..04cf002 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ IIfA/.idea/dictionaries/P.xml
 IIfA/.idea/misc.xml
 IIfA/.idea/modules.xml
 IIfA/.idea/workspace.xml
+assets/
\ No newline at end of file
diff --git a/IIfA/IIfABackpack.lua b/IIfA/IIfABackpack.lua
index 0d95a20..954490e 100644
--- a/IIfA/IIfABackpack.lua
+++ b/IIfA/IIfABackpack.lua
@@ -748,6 +748,8 @@ p("OnChestSelect '<<1>>' - <<2>>", choiceText, choice)
 				if cName == self.EMPTY_STRING then
 					cName = GetCollectibleName(cId)
 				end
+                		--remove gender specific characters from house bank chest name
+                		cName = zo_strformat("<<C:1>>", cName)
 				if cName == choiceText then
 					IIfA:SetInventoryListFilter("Housing Storage", ctr)
 					break
@@ -779,6 +781,8 @@ p("OnChestSelect '<<1>>' - <<2>>", choiceText, choice)
 				if cName == self.EMPTY_STRING then
 					cName = GetCollectibleName(cId)
 				end
+                		--remove gender specific characters from house bank chest name
+                		cName = zo_strformat("<<C:1>>", cName)
 				entry = comboBox:CreateItemEntry(cName, OnChestSelect)
 				comboBox:AddItem(entry)
 			end
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index ec82dad..2f4f935 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -80,8 +80,7 @@ function IIfA:CollectGuildBank(curGuild)
 		end
 	end

-	SelectGuildBank(CurGB)
-	local count = 0
+	SelectGuildBank(curGB)

 	if(IIfA.data.guildBanks[curGuild] == nil) then
 		IIfA.data.guildBanks[curGuild] = {}
@@ -95,7 +94,7 @@ function IIfA:CollectGuildBank(curGuild)
 		IIfA.BagSlotInfo = IIfA.BagSlotInfo or {}
 		p("Collect guild bank - <<1>>", curGuild)
 		local guildData = IIfA.data.guildBanks[curGuild]
-		local itemCount, i, slotIndex
+		local itemCount, slotIndex
 		itemCount = 0
 		slotIndex = ZO_GetNextBagSlotIndex(BAG_GUILDBANK, nil)
 		while slotIndex do
@@ -105,7 +104,6 @@ function IIfA:CollectGuildBank(curGuild)

 		p("GuildBank Item Count = " .. itemCount)

---		guildData.items = #ZO_GuildBankBackpack.data
 		guildData.lastCollected = GetDate() .. "@" .. GetFormattedTime();

 		IIfA:ClearLocationData(curGuild)
@@ -122,8 +120,8 @@ function IIfA:CollectGuildBank(curGuild)
 			IIfA.BagSlotInfo[curGuild][slotIndex] = itemKey
 			slotIndex = ZO_GetNextBagSlotIndex(BAG_GUILDBANK, slotIndex)
 		end
+		p("IIfA - Guild Bank Collected - " .. curGuild .. ", itemCount=" .. itemCount)
 	end)
-	p("IIfA - Guild Bank Collected - " .. curGuild .. ", itemCount=" .. itemCount)
 end

 function IIfA:ScanCurrentCharacter()
@@ -462,6 +460,7 @@ function IIfA:EvalBagItem(bagId, slotId, fromXfer, qty, itemLink, itemName, loca
 	-- item count is either passed or we have to get it from bag/slot ID or item link
 	local bAddQty = false
 	if qty ~= nil then bAddQty = true end
+
 	local itemCount = qty or getItemCount(bagId, slotId, itemLink)

 	--p("trying to save <<1>> x<<2>>", itemLink, itemCount)
diff --git a/IIfA/IIfAEvents.lua b/IIfA/IIfAEvents.lua
index d0f29a6..b190a01 100644
--- a/IIfA/IIfAEvents.lua
+++ b/IIfA/IIfAEvents.lua
@@ -154,7 +154,7 @@ local function fgb4(...)
 	IIfA_EventDump(...)
 end
 local function fgb5(...)
-	d("gb items ready")
+	d("inventory fragment state change")
 	IIfA_EventDump(...)
 end

@@ -206,6 +206,7 @@ function IIfA:RegisterForEvents()

 	--    ZO_QuickSlot:RegisterForEvent(EVENT_ABILITY_COOLDOWN_UPDATED, IIfA_EventDump)
 	ZO_PreHook('ZO_InventorySlot_ShowContextMenu', function(rowControl) IIfA:ProcessRightClick(rowControl) end)
+
 end


diff --git a/IIfA/IIfASceneFuncs.lua b/IIfA/IIfASceneFuncs.lua
index e58fbe8..8999738 100644
--- a/IIfA/IIfASceneFuncs.lua
+++ b/IIfA/IIfASceneFuncs.lua
@@ -37,22 +37,34 @@ function IIfA:RegisterForSceneChanges()
 			end
 		end
 	end
+
+	INVENTORY_FRAGMENT:RegisterCallback("StateChange", function(...)
+	   	IIfA:ProcessInventoryTabChange("", ...)
+	end)
+	CRAFT_BAG_FRAGMENT:RegisterCallback("StateChange", function(...)
+	   	IIfA:ProcessInventoryTabChange("", ...)
+	end)
+	WALLET_FRAGMENT:RegisterCallback("StateChange", function(...)
+	   	IIfA:ProcessInventoryTabChange("", ...)
+	end)
+	QUICKSLOT_FRAGMENT:RegisterCallback("StateChange", function(...)
+	   	IIfA:ProcessInventoryTabChange("_quickSlots", ...)
+	end)
 end

 function IIfA:GetSceneSettings(sceneName)

 	sceneName = sceneName or IIfA:GetCurrentSceneName()
-
-
 	local settings = IIfA:GetSettings().frameSettings
-
 	if not settings[sceneName] then
 		-- if we have to create a new set of scene info, register it in the scene change too, it'll be set again during next opening

 		local scene = SCENE_MANAGER:GetScene(sceneName)
-		scene:RegisterCallback("StateChange", function(...)
-				IIfA:ProcessSceneChange(sceneName, ...)
-			end)
+		if scene then
+			scene:RegisterCallback("StateChange", function(...)
+					IIfA:ProcessSceneChange(sceneName, ...)
+				end)
+		end
 		-- save the settings in the settings table, base it on HUD
 		settings[sceneName] = ZO_DeepTableCopy(settings["hud"])
 		settings[sceneName].hidden = true
@@ -68,6 +80,23 @@ function IIfA:ProcessSceneChange(sceneName, oldState, newState)
 	-- IIfA:DebugOut(zo_strformat("ProcessSceneChange <<1>>: <<2>> -> <<3>>", sceneName, oldState, newState))
 	if SCENE_SHOWN == newState then
 		sceneName = IIfA:GetCurrentSceneName()
+		if sceneName == "inventory" then
+			if not QUICKSLOT_FRAGMENT:IsHidden() then
+				sceneName = sceneName .. "_quickslots"
+			end
+		end
+		local settings = IIfA:GetSceneSettings(sceneName)
+		self:RePositionFrame(settings)
+	elseif SCENE_HIDDEN == newState then
+		IIFA_GUI:SetHidden(true)
+	end
+end
+
+
+function IIfA:ProcessInventoryTabChange(tabName, oldState, newState)
+	-- IIfA:DebugOut(zo_strformat("ProcessSceneChange <<1>>: <<2>> -> <<3>>", oldState, newState))
+	if newState == SCENE_SHOWN then
+		sceneName = "inventory" .. tabName
 		local settings = IIfA:GetSceneSettings(sceneName)
 		self:RePositionFrame(settings)

@@ -81,6 +110,10 @@ function IIfA:SaveFrameInfo(calledFrom)
 	if (calledFrom == "onHide") then return end

 	local sceneName = IIfA:GetCurrentSceneName()
+	if not QUICKSLOT_FRAGMENT:IsHidden() then
+		sceneName = sceneName .. "_quickslots"
+	end
+
 	local settings = IIfA:GetSceneSettings(sceneName)

     settings.hidden = IIFA_GUI:IsControlHidden()
@@ -95,7 +128,7 @@ function IIfA:SaveFrameInfo(calledFrom)
 	end
 end

--- called only from bindings.xml on keypress
+-- called from bindings.xml on keypress, and on /iifa toggle chat cmd
 function IIfA:ToggleInventoryFrame()
 	IIFA_GUI:SetHidden(not IIFA_GUI:IsControlHidden())
 	if not IIFA_GUI:IsControlHidden() then
diff --git a/IIfA/IIfASettingsAdapter.lua b/IIfA/IIfASettingsAdapter.lua
index 1bb55f6..7143a8b 100644
--- a/IIfA/IIfASettingsAdapter.lua
+++ b/IIfA/IIfASettingsAdapter.lua
@@ -137,7 +137,10 @@ end
 function IIfA:GetTrackingWithHouseNames()
 	local ret = {}
 	for collectibleId, trackIt in pairs(IIfA.data.collectHouseData) do
-		ret[GetCollectibleName(collectibleId)] = true
+        local collectibleName = GetCollectibleName(collectibleId)
+        --remove gender specific characters from house name
+        collectibleName = zo_strformat("<<C:1>>", collectibleName)
+		ret[collectibleName] = true
 	end
 	return ret
 end
@@ -147,6 +150,8 @@ function IIfA:RebuildHouseMenuDropdowns()
 	local ignored = {}
 	for collectibleId, trackIt in pairs(IIfA.data.collectHouseData) do
 		local collectibleName = GetCollectibleName(collectibleId)
+		--remove gender specific characters from house name
+        collectibleName = zo_strformat("<<C:1>>", collectibleName)
 		-- cache house name for lookup
 		IIfA.houseNameToIdTbl[collectibleName] = collectibleId
 		local targetTable = (trackIt and tracked) or ignored
@@ -155,12 +160,14 @@ function IIfA:RebuildHouseMenuDropdowns()
 	IIfA.houseNamesIgnored = ignored
 	IIfA.houseNamesTracked = tracked
 end
+
 function IIfA:GetIgnoredHouseNames()
 	if nil == IIfA.houseNamesIgnored then
 		IIfA:RebuildHouseMenuDropdowns()
 	end
 	return IIfA.houseNamesIgnored
 end
+
 function IIfA:GetTrackedHouseNames()
 	if nil == IIfA.houseNamesIgnored then
 		IIfA:RebuildHouseMenuDropdowns()
@@ -175,6 +182,7 @@ function IIfA:GetAllHouseIds()
 	end
 	return ret
 end
+
 function IIfA:SetTrackingForHouse(houseCollectibleId, trackIt)
 	houseCollectibleId = houseCollectibleId or GetCollectibleIdForHouse(GetCurrentZoneHouseId())
 	if tonumber(houseCollectibleId) ~= houseCollectibleId then
diff --git a/IIfA/IIfA_xml_adapter.lua b/IIfA/IIfA_xml_adapter.lua
index 51f7818..c04e0c7 100644
--- a/IIfA/IIfA_xml_adapter.lua
+++ b/IIfA/IIfA_xml_adapter.lua
@@ -508,7 +508,7 @@ function IIfA:RePositionFrame(settings)
 	if bMinimize then
 		IIFA_GUI:SetResizeHandleSize(0)
 		-- have to change the constraints, it even constrains resizing by code, not just resize by sizing handles
-   		IIFA_GUI:SetDimensionConstraints(IIfA.minWidth, 33, -1, 1400)
+   		IIFA_GUI:SetDimensionConstraints(IIfA.minWidth, 44, -1, 1400)

 		IIFA_GUI:SetHeight(33)
 		IIFA_GUI:SetWidth(settings.width)