editor_node: add an option to stop the update spinner from spinning, fixes #6653

This commit is contained in:
J08nY 2016-10-01 16:15:07 +02:00
parent 6b283ae293
commit 4527fbcfa1
No known key found for this signature in database
GPG key ID: 7F4A448FE68F329D
2 changed files with 13 additions and 4 deletions

View file

@ -268,8 +268,10 @@ void EditorNode::_notification(int p_what) {
circle_step_msec=tick; circle_step_msec=tick;
circle_step_frame=frame+1; circle_step_frame=frame+1;
// update the circle itself only when its enabled
if (!update_menu->get_popup()->is_item_checked(3)){
update_menu->set_icon(gui_base->get_icon("Progress"+itos(circle_step+1),"EditorIcons")); update_menu->set_icon(gui_base->get_icon("Progress"+itos(circle_step+1),"EditorIcons"));
}
} }
scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height"))); scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height")));
@ -2797,6 +2799,10 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
update_menu->get_popup()->set_item_checked(1,true); update_menu->get_popup()->set_item_checked(1,true);
OS::get_singleton()->set_low_processor_usage_mode(true); OS::get_singleton()->set_low_processor_usage_mode(true);
} break; } break;
case SETTINGS_UPDATE_SPINNER_HIDE: {
update_menu->set_icon(gui_base->get_icon("Collapse","EditorIcons"));
update_menu->get_popup()->toggle_item_checked(3);
} break;
case SETTINGS_PREFERENCES: { case SETTINGS_PREFERENCES: {
settings_config_dialog->popup_edit_settings(); settings_config_dialog->popup_edit_settings();
@ -6064,6 +6070,8 @@ EditorNode::EditorNode() {
p=update_menu->get_popup(); p=update_menu->get_popup();
p->add_check_item(TTR("Update Always"),SETTINGS_UPDATE_ALWAYS); p->add_check_item(TTR("Update Always"),SETTINGS_UPDATE_ALWAYS);
p->add_check_item(TTR("Update Changes"),SETTINGS_UPDATE_CHANGES); p->add_check_item(TTR("Update Changes"),SETTINGS_UPDATE_CHANGES);
p->add_separator();
p->add_check_item(TTR("Disable Update Spinner"),SETTINGS_UPDATE_SPINNER_HIDE);
p->set_item_checked(1,true); p->set_item_checked(1,true);
//sources_button->connect(); //sources_button->connect();

View file

@ -179,6 +179,7 @@ private:
RUN_RELOAD_SCRIPTS, RUN_RELOAD_SCRIPTS,
SETTINGS_UPDATE_ALWAYS, SETTINGS_UPDATE_ALWAYS,
SETTINGS_UPDATE_CHANGES, SETTINGS_UPDATE_CHANGES,
SETTINGS_UPDATE_SPINNER_HIDE,
SETTINGS_EXPORT_PREFERENCES, SETTINGS_EXPORT_PREFERENCES,
SETTINGS_PREFERENCES, SETTINGS_PREFERENCES,
SETTINGS_OPTIMIZED_PRESETS, SETTINGS_OPTIMIZED_PRESETS,