diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2016-04-05 13:52:18 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2016-04-05 13:52:18 +0100 |
commit | 15f43149e179f754f48b59ac08002d5c4c0a5bc0 (patch) | |
tree | c844c14de420cb17be49edf171690039f66a3173 /scene/gui | |
parent | 9c89d3e042fd7a6472ac2261afedaa235d2b4ebb (diff) |
Fixed undoing twice when removing selection
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 4be8dd850c..3524cd5b0d 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1747,6 +1747,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { } if (clear) { + _begin_compex_operation(); selection.active=false; update(); _remove_text(selection.from_line,selection.from_column,selection.to_line,selection.to_column); @@ -2417,6 +2418,10 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { if (insert_mode && !had_selection) { _end_compex_operation(); } + + if (selection.active != had_selection) { + _end_compex_operation(); + } accept_event(); } else { |