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:
Ignacio R. Morelle 2012-05-30 22:38:34 +00:00
parent 96a7acdca3
commit 4346f74c1d

View File

@ -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) {