From 3aeeec3dfcc98f9c71a4707334a275edd917d96d Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 13 May 2024 10:32:54 +0400 Subject: [PATCH] Fix initial InputField text setting. After stargin to merge block format to current cursor the _lastTextWithTags was cleared before being set from the same reference. --- ui/widgets/fields/input_field.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/widgets/fields/input_field.cpp b/ui/widgets/fields/input_field.cpp index 54add34..b4dbcc3 100644 --- a/ui/widgets/fields/input_field.cpp +++ b/ui/widgets/fields/input_field.cpp @@ -1341,8 +1341,8 @@ InputField::InputField( setCursor(style::cur_text); heightAutoupdated(); - if (!_lastTextWithTags.text.isEmpty()) { - setTextWithTags(_lastTextWithTags, HistoryAction::Clear); + if (!value.text.isEmpty()) { + setTextWithTags(value, HistoryAction::Clear); } startBorderAnimation();