PDFViewer: Prevent infinity recursion

When removing all contents from the NumericInput box in PDFViewer the
callback set the (empty) text again back in the box, triggering another
callback in a recursive, non-stopping fashion. Not setting the text back
in the box avoids the problem.
This commit is contained in:
Rodrigo Tobar 2022-11-22 23:08:56 +08:00 committed by Andreas Kling
parent bc7da24fe6
commit a740423e23
Notes: sideshowbarker 2024-07-18 08:59:31 +09:00

View File

@ -29,7 +29,6 @@ NumericInput::NumericInput()
auto new_number_opt = builder.to_string().to_int();
if (!new_number_opt.has_value()) {
m_needs_text_reset = true;
set_text(builder.to_string());
return;
} else {
m_needs_text_reset = false;