diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1b6c11c..8c3831b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,11 +3,7 @@
-
-
-
-
@@ -61,8 +57,8 @@
-
+
@@ -83,7 +79,7 @@
-
+
@@ -103,8 +99,8 @@
-
-
+
+
@@ -113,7 +109,7 @@
-
+
@@ -123,8 +119,8 @@
-
-
+
+
@@ -133,7 +129,7 @@
-
+
@@ -143,7 +139,7 @@
-
+
@@ -229,6 +225,7 @@
+
@@ -250,7 +247,6 @@
-
@@ -282,19 +278,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -322,6 +305,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -383,7 +379,6 @@
-
@@ -396,11 +391,12 @@
-
+
-
+
+
@@ -423,6 +419,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -497,20 +573,12 @@
-
+
-
-
-
-
-
-
-
-
@@ -521,16 +589,24 @@
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/buy.lua b/buy.lua
index 2c61194..6403831 100644
--- a/buy.lua
+++ b/buy.lua
@@ -826,18 +826,20 @@ end
function AuxBuyQualityDropDown_Initialize()
+ local function on_click()
+ UIDropDownMenu_SetSelectedValue(AuxBuyQualityDropDown, this.value)
+ end
+
UIDropDownMenu_AddButton{
text = ALL,
value = -1,
- func = AuxBuyQualityDropDown_OnClick,
+ func = on_click,
}
for i=0,getn(ITEM_QUALITY_COLORS)-2 do
UIDropDownMenu_AddButton{
text = getglobal("ITEM_QUALITY"..i.."_DESC"),
value = i,
- func = function()
- UIDropDownMenu_SetSelectedValue(AuxBuyQualityDropDown, this.value)
- end,
+ func = on_click,
}
end
end
diff --git a/list.lua b/list.lua
index b20c76c..889b9f7 100644
--- a/list.lua
+++ b/list.lua
@@ -254,7 +254,7 @@ function Aux.list.sort(sheet, column_index)
local column = sheet.columns[column_index]
- if sheet.sort_order[1].column == column then
+ if sheet.sort_order[1] and sheet.sort_order[1].column == column then
sheet.sort_order[1].sort_ascending = not sheet.sort_order[1].sort_ascending
else
sheet.sort_order = Aux.util.filter(sheet.sort_order, function(sort_info) return not sort_info.column == column end)