Quantcast

attempted fix for api errors on tradeskills

Joe Vaughan [11-01-16 - 16:26]
attempted fix for api errors on tradeskills

Fixed the GetParent call but that then showed a SetPoint issue on DD Texts. Have commented out the call with no apparent negative effects... let's test and see.
Filename
SVUI_!Core/system/api.lua
diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua
index ea07e9e..7b0b9ea 100644
--- a/SVUI_!Core/system/api.lua
+++ b/SVUI_!Core/system/api.lua
@@ -1911,7 +1911,7 @@ MOD.Concepts["DropDown"] = function(self, adjustable, frame, width)

     if(ddButton) then
         if(ddText) then
-            ddText:SetPoint("RIGHT", ddButton, "LEFT", 2, 0)
+            --ddText:SetPoint("RIGHT", ddButton, "LEFT", 2, 0)
         end

         ddButton:ClearAllPoints()
@@ -2276,7 +2276,7 @@ local ModifyBasicScroll = function(self, adjustable, frame, scale, yOffset, scro
 end

 local ModifyHybridScroll = function(self, adjustable, frame, scale, yOffset)
-    local bg, track, top, bottom, mid, upButton, downButton
+    local parent, bg, track, top, bottom, mid, upButton, downButton
     bg = frame.BG;
     if(bg) then bg:SetTexture("") end
     track = frame.trackBG or frame.Track;
@@ -2287,9 +2287,11 @@ local ModifyHybridScroll = function(self, adjustable, frame, scale, yOffset)
     if(bottom) then bottom:SetTexture("") end
     mid = frame.ScrollBarMiddle or frame.Middle;
     if(mid) then mid:SetTexture("") end
-    upButton = frame.GetParent().scrollUp or frame.ScrollUpButton;
-    downButton = frame.GetParent().scrollDown or frame.ScrollDownButton;
-
+    parent = frame:GetParent()
+    if parent then
+        upButton = parent.scrollUp or frame.ScrollUpButton;
+        downButton = parent.scrollDown or frame.ScrollDownButton;
+    end
     if(upButton and downButton) then
         ModifyScrollType1(self, adjustable, frame, scale, yOffset, upButton, downButton)
     elseif(frame.GetOrientation) then