Skip to content

Commit

Permalink
Show editor toaster when copying [codeblock] in class reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickeon committed Nov 19, 2024
1 parent a0cd8f1 commit 8138965
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/editor_help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "editor/editor_property_name_processor.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/gui/editor_toaster.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/line_edit.h"
Expand Down Expand Up @@ -329,6 +330,7 @@ void EditorHelp::_class_desc_select(const String &p_select) {
OS::get_singleton()->shell_open(p_select);
} else if (p_select.begins_with("^")) { // Copy button.
DisplayServer::get_singleton()->clipboard_set(p_select.substr(1));
EditorToaster::get_singleton()->popup_str(TTR("Copied to clipboard."), EditorToaster::SEVERITY_INFO);
}
}

Expand Down

0 comments on commit 8138965

Please sign in to comment.