浏览代码

Always soft reload editor plugins. Closes #5273

Juan Linietsky 9 年之前
父节点
当前提交
3e3108abe2
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tools/editor/plugins/script_editor_plugin.cpp

+ 3 - 1
tools/editor/plugins/script_editor_plugin.cpp

@@ -1481,7 +1481,9 @@ void ScriptEditor::_menu_option(int p_option) {
 				if (scr.is_null())
 					return;
 				scr->set_source_code(te->get_text());
-				scr->get_language()->reload_tool_script(scr,p_option==FILE_TOOL_RELOAD_SOFT);
+				bool soft = p_option==FILE_TOOL_RELOAD_SOFT || scr->get_instance_base_type()=="EditorPlugin"; //always soft-reload editor plugins
+
+				scr->get_language()->reload_tool_script(scr,soft);
 			} break;
 			case EDIT_TRIM_TRAILING_WHITESAPCE: {
 				_trim_trailing_whitespace(current->get_text_edit());