Fix error label clicking in status bar for shader editor
(cherry picked from commit 25cb5a42e0
)
This commit is contained in:
parent
0f30fa8fbd
commit
5be4e10f4e
|
@ -1561,7 +1561,7 @@ void CodeTextEditor::_toggle_scripts_pressed() {
|
||||||
void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
|
void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
|
||||||
Ref<InputEventMouseButton> mb = p_event;
|
Ref<InputEventMouseButton> mb = p_event;
|
||||||
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
||||||
emit_signal("error_pressed");
|
goto_error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1688,7 +1688,6 @@ void CodeTextEditor::_bind_methods() {
|
||||||
ADD_SIGNAL(MethodInfo("validate_script"));
|
ADD_SIGNAL(MethodInfo("validate_script"));
|
||||||
ADD_SIGNAL(MethodInfo("load_theme_settings"));
|
ADD_SIGNAL(MethodInfo("load_theme_settings"));
|
||||||
ADD_SIGNAL(MethodInfo("show_warnings_panel"));
|
ADD_SIGNAL(MethodInfo("show_warnings_panel"));
|
||||||
ADD_SIGNAL(MethodInfo("error_pressed"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeTextEditor::set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud) {
|
void CodeTextEditor::set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud) {
|
||||||
|
|
|
@ -380,10 +380,6 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) {
|
||||||
warnings_panel->set_visible(p_show);
|
warnings_panel->set_visible(p_show);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptTextEditor::_error_pressed() {
|
|
||||||
code_editor->goto_error();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScriptTextEditor::_warning_clicked(Variant p_line) {
|
void ScriptTextEditor::_warning_clicked(Variant p_line) {
|
||||||
if (p_line.get_type() == Variant::INT) {
|
if (p_line.get_type() == Variant::INT) {
|
||||||
code_editor->get_text_edit()->cursor_set_line(p_line.operator int64_t());
|
code_editor->get_text_edit()->cursor_set_line(p_line.operator int64_t());
|
||||||
|
@ -1467,7 +1463,6 @@ void ScriptTextEditor::_bind_methods() {
|
||||||
ClassDB::bind_method("_lookup_symbol", &ScriptTextEditor::_lookup_symbol);
|
ClassDB::bind_method("_lookup_symbol", &ScriptTextEditor::_lookup_symbol);
|
||||||
ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input);
|
ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input);
|
||||||
ClassDB::bind_method("_show_warnings_panel", &ScriptTextEditor::_show_warnings_panel);
|
ClassDB::bind_method("_show_warnings_panel", &ScriptTextEditor::_show_warnings_panel);
|
||||||
ClassDB::bind_method("_error_pressed", &ScriptTextEditor::_error_pressed);
|
|
||||||
ClassDB::bind_method("_warning_clicked", &ScriptTextEditor::_warning_clicked);
|
ClassDB::bind_method("_warning_clicked", &ScriptTextEditor::_warning_clicked);
|
||||||
ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
|
ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
|
||||||
|
|
||||||
|
@ -1817,7 +1812,6 @@ ScriptTextEditor::ScriptTextEditor() {
|
||||||
warnings_panel->set_focus_mode(FOCUS_CLICK);
|
warnings_panel->set_focus_mode(FOCUS_CLICK);
|
||||||
warnings_panel->hide();
|
warnings_panel->hide();
|
||||||
|
|
||||||
code_editor->connect("error_pressed", this, "_error_pressed");
|
|
||||||
code_editor->connect("show_warnings_panel", this, "_show_warnings_panel");
|
code_editor->connect("show_warnings_panel", this, "_show_warnings_panel");
|
||||||
warnings_panel->connect("meta_clicked", this, "_warning_clicked");
|
warnings_panel->connect("meta_clicked", this, "_warning_clicked");
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,6 @@ protected:
|
||||||
void _load_theme_settings();
|
void _load_theme_settings();
|
||||||
void _set_theme_for_script();
|
void _set_theme_for_script();
|
||||||
void _show_warnings_panel(bool p_show);
|
void _show_warnings_panel(bool p_show);
|
||||||
void _error_pressed();
|
|
||||||
void _warning_clicked(Variant p_line);
|
void _warning_clicked(Variant p_line);
|
||||||
|
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
Loading…
Reference in New Issue