-Position Fix
Xruptor [06-27-10 - 23:26]
diff --git a/XanEXP.lua b/XanEXP.lua
index f7b6858..b9b4224 100644
--- a/XanEXP.lua
+++ b/XanEXP.lua
@@ -160,8 +160,8 @@ function f:SaveLayout(frame)
XanEXP_DB[frame] = {
["point"] = "CENTER",
["relativePoint"] = "CENTER",
- ["xOfs"] = 0,
- ["yOfs"] = 0,
+ ["PosX"] = 0,
+ ["PosY"] = 0,
}
opt = XanEXP_DB[frame];
end
@@ -170,8 +170,6 @@ function f:SaveLayout(frame)
local scale = f:GetEffectiveScale();
opt.PosX = f:GetLeft() * scale;
opt.PosY = f:GetTop() * scale;
- --opt.Width = f:GetWidth();
- --opt.Height = f:GetHeight();
end
@@ -186,8 +184,8 @@ function f:RestoreLayout(frame)
XanEXP_DB[frame] = {
["point"] = "CENTER",
["relativePoint"] = "CENTER",
- ["xOfs"] = 0,
- ["yOfs"] = 0,
+ ["PosX"] = 0,
+ ["PosY"] = 0,
}
opt = XanEXP_DB[frame];
end
@@ -196,11 +194,11 @@ function f:RestoreLayout(frame)
local y = opt.PosY;
local s = f:GetEffectiveScale();
- if not x or not y then
+ if (not x or not y) or (x==0 and y==0) then
f:ClearAllPoints();
f:SetPoint("CENTER", UIParent, "CENTER", 0, 0);
return
- end
+ end
--calculate the scale
x,y = x/s,y/s;