소스 검색

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());