mirror of
https://github.com/godotengine/godot
synced 2024-09-04 22:28:26 +00:00
Merge pull request #87012 from TheSofox/line-edit-undo-caret-fix
Fix `LineEdit` caret rendering/positioning on Undo.
This commit is contained in:
commit
3482da422d
|
@ -1227,9 +1227,10 @@ void LineEdit::undo() {
|
|||
TextOperation op = undo_stack_pos->get();
|
||||
text = op.text;
|
||||
scroll_offset = op.scroll_offset;
|
||||
set_caret_column(op.caret_column);
|
||||
|
||||
_shape();
|
||||
set_caret_column(op.caret_column);
|
||||
|
||||
_emit_text_change();
|
||||
}
|
||||
|
||||
|
@ -1251,9 +1252,10 @@ void LineEdit::redo() {
|
|||
TextOperation op = undo_stack_pos->get();
|
||||
text = op.text;
|
||||
scroll_offset = op.scroll_offset;
|
||||
set_caret_column(op.caret_column);
|
||||
|
||||
_shape();
|
||||
set_caret_column(op.caret_column);
|
||||
|
||||
_emit_text_change();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue