diff options
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index b3788f6317..31767dd263 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1596,14 +1596,16 @@ void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) { selection.to_char = words[i + 1]; selection.active = true; - DisplayServer::get_singleton()->clipboard_set_primary(get_selected_text()); + if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CLIPBOARD_PRIMARY)) { + DisplayServer::get_singleton()->clipboard_set_primary(get_selected_text()); + } update(); break; } } } } else if (!b->is_pressed()) { - if (selection.enabled) { + if (selection.enabled && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CLIPBOARD_PRIMARY)) { DisplayServer::get_singleton()->clipboard_set_primary(get_selected_text()); } selection.click_item = nullptr; |