diff options
Diffstat (limited to 'editor/plugins/debugger_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/debugger_editor_plugin.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp index e0d345663c..0ca479555d 100644 --- a/editor/plugins/debugger_editor_plugin.cpp +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -114,7 +114,6 @@ void DebuggerEditorPlugin::_select_run_count(int p_index) { void DebuggerEditorPlugin::_menu_option(int p_option) { switch (p_option) { case RUN_FILE_SERVER: { - bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER)); if (ischecked) { @@ -128,7 +127,6 @@ void DebuggerEditorPlugin::_menu_option(int p_option) { } break; case RUN_LIVE_DEBUG: { - bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG)); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked); @@ -137,28 +135,24 @@ void DebuggerEditorPlugin::_menu_option(int p_option) { } break; case RUN_DEPLOY_REMOTE_DEBUG: { - bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG)); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG), !ischecked); EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_deploy_remote_debug", !ischecked); } break; case RUN_DEBUG_COLLISONS: { - bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_COLLISONS)); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_COLLISONS), !ischecked); EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisons", !ischecked); } break; case RUN_DEBUG_NAVIGATION: { - bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION)); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION), !ischecked); EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_navigation", !ischecked); } break; case RUN_RELOAD_SCRIPTS: { - bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS)); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked); @@ -170,8 +164,9 @@ void DebuggerEditorPlugin::_menu_option(int p_option) { } void DebuggerEditorPlugin::_notification(int p_what) { - if (p_what == NOTIFICATION_READY) + if (p_what == NOTIFICATION_READY) { _update_debug_options(); + } } void DebuggerEditorPlugin::_update_debug_options() { @@ -183,18 +178,24 @@ void DebuggerEditorPlugin::_update_debug_options() { bool check_reload_scripts = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_reload_scripts", false); int instances = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_instances", 1); - if (check_deploy_remote) + if (check_deploy_remote) { _menu_option(RUN_DEPLOY_REMOTE_DEBUG); - if (check_file_server) + } + if (check_file_server) { _menu_option(RUN_FILE_SERVER); - if (check_debug_collisions) + } + if (check_debug_collisions) { _menu_option(RUN_DEBUG_COLLISONS); - if (check_debug_navigation) + } + if (check_debug_navigation) { _menu_option(RUN_DEBUG_NAVIGATION); - if (check_live_debug) + } + if (check_live_debug) { _menu_option(RUN_LIVE_DEBUG); - if (check_reload_scripts) + } + if (check_reload_scripts) { _menu_option(RUN_RELOAD_SCRIPTS); + } int len = instances_menu->get_item_count(); for (int idx = 0; idx < len; idx++) { |