Преглед на файлове

Merge pull request #10649 from akien-mga/code-error-always-show

Code editor: Don't play hide and seek with error label
Rémi Verschelde преди 8 години
родител
ревизия
9d7945250e
променени са 1 файла, в които са добавени 1 реда и са изтрити 7 реда
  1. 1 7
      editor/code_editor.cpp

+ 1 - 7
editor/code_editor.cpp

@@ -1093,12 +1093,7 @@ void CodeTextEditor::update_editor_settings() {
 
 
 void CodeTextEditor::set_error(const String &p_error) {
 void CodeTextEditor::set_error(const String &p_error) {
 
 
-	if (p_error != "") {
-		error->set_text(p_error);
-		error->show();
-	} else {
-		error->hide();
-	}
+	error->set_text(p_error);
 }
 }
 
 
 void CodeTextEditor::_update_font() {
 void CodeTextEditor::_update_font() {
@@ -1223,7 +1218,6 @@ CodeTextEditor::CodeTextEditor() {
 
 
 	error = memnew(Label);
 	error = memnew(Label);
 	status_bar->add_child(error);
 	status_bar->add_child(error);
-	error->hide();
 	error->set_clip_text(true); //do not change, or else very long errors can push the whole container to the right
 	error->set_clip_text(true); //do not change, or else very long errors can push the whole container to the right
 	error->set_valign(Label::VALIGN_CENTER);
 	error->set_valign(Label::VALIGN_CENTER);
 	error->add_color_override("font_color", Color(1, 0.7, 0.6, 0.9));
 	error->add_color_override("font_color", Color(1, 0.7, 0.6, 0.9));