diff options
author | MidZik <matt.idzik1@gmail.com> | 2018-08-24 04:35:46 -0500 |
---|---|---|
committer | MidZik <matt.idzik1@gmail.com> | 2018-08-24 04:45:05 -0500 |
commit | 7aca4c32e2d3051b4d58adafe401da2e97f77c44 (patch) | |
tree | e571a4e760c29add4a910c060e39fef6b49f5b80 | |
parent | 34e58fd831172bad1eebb748c97238c28864423a (diff) |
Disable ability to copy or cut text from LineEdit if secret mode is enabled.
-rw-r--r-- | scene/gui/line_edit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 549daecdae..1f3d5e6e13 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -866,15 +866,14 @@ void LineEdit::_notification(int p_what) { void LineEdit::copy_text() { - if (selection.enabled) { - + if (selection.enabled && !pass) { OS::get_singleton()->set_clipboard(text.substr(selection.begin, selection.end - selection.begin)); } } void LineEdit::cut_text() { - if (selection.enabled) { + if (selection.enabled && !pass) { OS::get_singleton()->set_clipboard(text.substr(selection.begin, selection.end - selection.begin)); selection_delete(); } |