fix bugs

Leandro Silva [02-17-20 - 14:35]
fix bugs
Filename
LeoAltholic.lua
LeoAltholic.txt
LeoAltholicInit.lua
ui/checklist.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 2f3bb8f..b44d9e6 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -1206,7 +1206,9 @@ local function onGameMenuEnter()
 end

 local function onGameMenuExit()
-    LeoAltholicChecklistUI.RestorePosition()
+    if LeoAltholicChecklistUI.IsEnabled() and not LeoAltholicChecklistUI.IsHideWhenToolbar() then
+        LeoAltholicChecklist:SetHidden(false)
+    end
 end

 local function initialize()
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index 4f2be3d..c26eb4c 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100029 100030
-## Version: 1.7.5
-## AddOnVersion: 175
+## Version: 1.7.6
+## AddOnVersion: 176
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
 ## DependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index efbe5c4..617f553 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -6,7 +6,7 @@ LeoAltholicToolbarUI = LeoAltholicToolbarUI or {}

 LeoAltholic.name = "LeoAltholic"
 LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.7.5"
+LeoAltholic.version = "1.7.6"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "

 LeoAltholic.TAB_BIO = "Bio"
diff --git a/ui/checklist.lua b/ui/checklist.lua
index 840f7ba..df3d7c7 100644
--- a/ui/checklist.lua
+++ b/ui/checklist.lua
@@ -106,11 +106,10 @@ function LeoAltholicChecklistUI.RestorePosition()
     LeoAltholicChecklist:ClearAnchors()
     LeoAltholicChecklist:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
     if LeoAltholicChecklistUI.IsEnabled() and not LeoAltholicChecklistUI.IsHideWhenToolbar() then
+		LeoAltholicChecklist:SetHidden(false)
         if not LeoAltholicChecklistUI.checkAllDone() then    --added by Teva
-            LeoAltholicChecklist:SetHidden(false)
             LeoAltholicChecklistUI.MaximizeUI()
         else
-            LeoAltholicChecklist:SetHidden(false)
             LeoAltholicChecklistUI.MinimizeUI()
         end
     else
@@ -277,7 +276,6 @@ function LeoAltholicChecklistUI.doneWrit(craft)
     local label = GetControl(panel, "Craft"..craft)
     local texture = GetControl(panel, "Craft"..craft.."Status")
     writdoneItem(label, texture)        --TevaNOTE: was doneItem but was always saying that instead of between, so modified to at least warn it might be wrong
-    LeoAltholicChecklistUI.checkAllDone()
     if LeoAltholicChecklistUI.checkAllDone() then LeoAltholicChecklistUI.MinimizeUI() end
     LeoAltholicChecklistUI.update()    --TevaNOTE: this line may be the key to solving the between/done issue in the checklist!
 end
@@ -328,6 +326,7 @@ function LeoAltholicChecklistUI.doneRiding()
     local label = GetControl(panel, "Riding")
     local texture = GetControl(panel, "RidingStatus")
     doneItem(label, texture)
+    if LeoAltholicChecklistUI.checkAllDone() then LeoAltholicChecklistUI.MinimizeUI() end
 end

 function LeoAltholicChecklistUI.initializeQuests()