diff options
author | Eric M <itsjusteza@gmail.com> | 2021-05-05 00:25:14 +1000 |
---|---|---|
committer | Eric M <itsjusteza@gmail.com> | 2021-05-05 00:25:14 +1000 |
commit | 87ffb213c8cc8dfce28dca1a3887b63a7c67d6ed (patch) | |
tree | ca97a76c7ad9c505d4a0a0576f23e92089bed798 | |
parent | ea9cab3e76b7cb8754b6d64102101f79a253ed8d (diff) |
Fixed issues with Editor Log after recent changes
Fixed #48446, Fixed #48443
-rw-r--r-- | editor/editor_log.cpp | 5 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 3957f981be..9f188b53c4 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -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); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 9efc1af23b..e8a908c30e 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -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); } |