mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 18:26:03 +00:00
addon/mg: Set the busy mouse cursor earlier
The first call to available_addons() in show_addons_manager_dialog() has the potential to be extremely expensive due to filesystem traversal inefficiencies, so it's better to set the busy cursor at that point instead of right before building the list rows.
This commit is contained in:
parent
96a7acdca3
commit
4346f74c1d
@ -469,6 +469,8 @@ sorted_addon_pointer_list sort_addons_list(addons_list& addons)
|
||||
|
||||
void show_addons_manager_dialog(display& disp, addons_client& client, addons_list& addons, std::string& last_addon_id, bool& stay_in_ui, bool& wml_changed, addons_filter_state& filter)
|
||||
{
|
||||
boost::scoped_ptr<cursor::setter> cursor_setter(new cursor::setter(cursor::WAIT));
|
||||
|
||||
stay_in_ui = false;
|
||||
filter.changed = false;
|
||||
|
||||
@ -534,8 +536,6 @@ void show_addons_manager_dialog(display& disp, addons_client& client, addons_lis
|
||||
// information.
|
||||
//
|
||||
|
||||
boost::scoped_ptr<cursor::setter> cursor_setter(new cursor::setter(cursor::WAIT));
|
||||
|
||||
const sorted_addon_pointer_list& sorted_addons = sort_addons_list(addons);
|
||||
|
||||
foreach(const sorted_addon_pointer_list::value_type& sorted_entry, sorted_addons) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user