mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Merge pull request #48451 from EricEzaM/output-log-fixes
Fixed issues with Editor Log after recent changes
This commit is contained in:
commit
4472eb3e4f
@ -224,7 +224,7 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
|
||||
log->add_text(p_message.text);
|
||||
|
||||
// Need to use pop() to exit out of the RichTextLabels current "push" stack.
|
||||
// We only "push" in the above swicth when message type != STD, so only pop when that is the case.
|
||||
// We only "push" in the above switch when message type != STD, so only pop when that is the case.
|
||||
if (p_message.type != MSG_TYPE_STD) {
|
||||
log->pop();
|
||||
}
|
||||
@ -298,6 +298,7 @@ EditorLog::EditorLog() {
|
||||
clear_button->set_flat(true);
|
||||
clear_button->set_focus_mode(FOCUS_NONE);
|
||||
clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K));
|
||||
clear_button->set_shortcut_context(this);
|
||||
clear_button->connect("pressed", callable_mp(this, &EditorLog::_clear_request));
|
||||
hb_tools->add_child(clear_button);
|
||||
|
||||
@ -306,6 +307,7 @@ EditorLog::EditorLog() {
|
||||
copy_button->set_flat(true);
|
||||
copy_button->set_focus_mode(FOCUS_NONE);
|
||||
copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KEY_MASK_CMD | KEY_C));
|
||||
copy_button->set_shortcut_context(this);
|
||||
copy_button->connect("pressed", callable_mp(this, &EditorLog::_copy_request));
|
||||
hb_tools->add_child(copy_button);
|
||||
|
||||
@ -331,6 +333,7 @@ EditorLog::EditorLog() {
|
||||
show_search_button->set_toggle_mode(true);
|
||||
show_search_button->set_pressed(true);
|
||||
show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTR("Open the search box."), KEY_MASK_CMD | KEY_F));
|
||||
show_search_button->set_shortcut_context(this);
|
||||
show_search_button->connect("toggled", callable_mp(this, &EditorLog::_set_search_visible));
|
||||
hb_tools2->add_child(show_search_button);
|
||||
|
||||
|
@ -2615,6 +2615,7 @@ void RichTextLabel::pop() {
|
||||
// Creates a new line without adding an ItemNewline to the previous line.
|
||||
// Useful when wanting to calling remove_line and add a new line immediately after.
|
||||
void RichTextLabel::increment_line_count() {
|
||||
_validate_line_caches(main);
|
||||
current_frame->lines.resize(current_frame->lines.size() + 1);
|
||||
_invalidate_current_line(current_frame);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user