소스 검색

Merge pull request #40375 from Paulb23/fix_visual_shader_clearing_color_regions

Fixed visual shader editor not clearing colour regions
Rémi Verschelde 5 년 전
부모
커밋
46dcd4ebea
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      editor/plugins/visual_shader_editor_plugin.cpp

+ 1 - 0
editor/plugins/visual_shader_editor_plugin.cpp

@@ -1711,6 +1711,7 @@ void VisualShaderEditor::_notification(int p_what) {
 			preview_text->add_theme_font_override("font", get_theme_font("expression", "EditorFonts"));
 			preview_text->add_theme_color_override("font_color", text_color);
 			syntax_highlighter->set_symbol_color(symbol_color);
+			syntax_highlighter->clear_color_regions();
 			syntax_highlighter->add_color_region("/*", "*/", comment_color, false);
 			syntax_highlighter->add_color_region("//", "", comment_color, false);