some bugfixes
This commit is contained in:
+27
-15
@@ -243,15 +243,14 @@ function private.discard_continuation()
|
|||||||
m.update_continuation()
|
m.update_continuation()
|
||||||
end
|
end
|
||||||
|
|
||||||
function private:enable_stop()
|
function private:update_start_stop()
|
||||||
Aux.scan.abort(m.search_scan_id)
|
if m.current_search().active then
|
||||||
m.stop_button:Show()
|
m.stop_button:Show()
|
||||||
m.start_button:Hide()
|
m.start_button:Hide()
|
||||||
end
|
else
|
||||||
|
m.start_button:Show()
|
||||||
function private:enable_start()
|
m.stop_button:Hide()
|
||||||
m.start_button:Show()
|
end
|
||||||
m.stop_button:Hide()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function private.start_real_time_scan(query, search, continuation)
|
function private.start_real_time_scan(query, search, continuation)
|
||||||
@@ -308,7 +307,9 @@ function private.start_real_time_scan(query, search, continuation)
|
|||||||
StaticPopup_Show('AUX_SEARCH_TABLE_FULL')
|
StaticPopup_Show('AUX_SEARCH_TABLE_FULL')
|
||||||
else
|
else
|
||||||
search.records = new_records
|
search.records = new_records
|
||||||
m.results_listing:SetDatabase(search.records)
|
if m.current_search() == search then
|
||||||
|
m.results_listing:SetDatabase(search.records)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
query.blizzard_query.first_page = next_page
|
query.blizzard_query.first_page = next_page
|
||||||
@@ -325,7 +326,8 @@ function private.start_real_time_scan(query, search, continuation)
|
|||||||
m.update_continuation()
|
m.update_continuation()
|
||||||
end
|
end
|
||||||
|
|
||||||
m:enable_start()
|
search.active = false
|
||||||
|
m.update_start_stop()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -368,7 +370,9 @@ function private.start_search(queries, continuation)
|
|||||||
search.status_bar:set_text(format('Scanning %d / %d (Page %d / %d)', current_query, total_queries, current_page, total_scan_pages))
|
search.status_bar:set_text(format('Scanning %d / %d (Page %d / %d)', current_query, total_queries, current_page, total_scan_pages))
|
||||||
end,
|
end,
|
||||||
on_page_scanned = function()
|
on_page_scanned = function()
|
||||||
m.results_listing:SetDatabase()
|
if m.current_search() == search then
|
||||||
|
m.results_listing:SetDatabase()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
on_start_query = function(query)
|
on_start_query = function(query)
|
||||||
current_query = current_query and current_query + 1 or start_query
|
current_query = current_query and current_query + 1 or start_query
|
||||||
@@ -394,7 +398,8 @@ function private.start_search(queries, continuation)
|
|||||||
m.update_tab(m.SAVED)
|
m.update_tab(m.SAVED)
|
||||||
end
|
end
|
||||||
|
|
||||||
m.enable_start()
|
search.active = false
|
||||||
|
m.update_start_stop()
|
||||||
end,
|
end,
|
||||||
on_abort = function()
|
on_abort = function()
|
||||||
search.status_bar:update_status(100, 100)
|
search.status_bar:update_status(100, 100)
|
||||||
@@ -409,7 +414,8 @@ function private.start_search(queries, continuation)
|
|||||||
m.update_continuation()
|
m.update_continuation()
|
||||||
end
|
end
|
||||||
|
|
||||||
m.enable_start()
|
search.active = false
|
||||||
|
m.update_start_stop()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -462,7 +468,8 @@ function public.execute(resume, real_time)
|
|||||||
|
|
||||||
local continuation = resume and m.current_search().continuation
|
local continuation = resume and m.current_search().continuation
|
||||||
m.discard_continuation()
|
m.discard_continuation()
|
||||||
m:enable_stop()
|
m.current_search().active = true
|
||||||
|
m.update_start_stop()
|
||||||
|
|
||||||
m.update_tab(m.RESULTS)
|
m.update_tab(m.RESULTS)
|
||||||
if real_time then
|
if real_time then
|
||||||
@@ -529,6 +536,10 @@ do
|
|||||||
m.record_remover(record)()
|
m.record_remover(record)()
|
||||||
end,
|
end,
|
||||||
function(index)
|
function(index)
|
||||||
|
if Aux.util.safe_index(m.results_listing:GetSelection(), 'record') ~= record then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
state = FOUND
|
state = FOUND
|
||||||
found_index = index
|
found_index = index
|
||||||
|
|
||||||
@@ -628,6 +639,7 @@ do
|
|||||||
m.next_button:Show()
|
m.next_button:Show()
|
||||||
m.search_box:SetPoint('LEFT', m.next_button, 'RIGHT', 4, 0)
|
m.search_box:SetPoint('LEFT', m.next_button, 'RIGHT', 4, 0)
|
||||||
end
|
end
|
||||||
|
m.update_start_stop()
|
||||||
m.update_continuation()
|
m.update_continuation()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user