some range input fixes

This commit is contained in:
Manuel Simon Hirsig
2016-08-15 03:14:26 +02:00
parent daad37672d
commit 751f85dcc9
3 changed files with 2 additions and 8 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ end
function private.scan()
m.state.query_index = m.state.query_index and m.state.query_index + 1 or 1
if m.query() then
if m.query() and (aux.index(m.query.blizzard_query, 'first_page') or 0) <= (aux.index(m.query.blizzard_query, 'last_page') or aux.huge) then
if m.query.blizzard_query then
m.state.page = m.query.blizzard_query.first_page or 0
else
-6
View File
@@ -85,9 +85,6 @@ function private.create_frames()
if this:GetText() ~= valid_input then
this:SetText(valid_input)
end
if (tonumber(m.last_page_input:GetText()) or aux.huge) < (tonumber(this:GetText()) or 1) then
m.last_page_input:SetText(tonumber(this:GetText()))
end
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
else
@@ -119,9 +116,6 @@ function private.create_frames()
if this:GetText() ~= valid_input then
this:SetText(valid_input)
end
if (tonumber(m.first_page_input:GetText()) or 1) > (tonumber(this:GetText()) or aux.huge) then
this:SetText(tonumber(this:GetText()))
end
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
else
+1 -1
View File
@@ -238,7 +238,7 @@ function private.blizzard_filter_parser()
end
if not filters.min_level then
filter = {'min_level', str}
elseif not filters.max_level and tonumber(str) >= tonumber(filters.min_level) then
elseif not filters.max_level then
filter = {'max_level', str}
else
return nil, 'Erroneous level range modifier'