mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Calculator: Treat constants and pasted numbers as input
Constants and pasted numbers leave Keypad in the External state which causes subsequent operations to be performed without an argument.
This commit is contained in:
parent
f58668031d
commit
c5360b1a5f
Notes:
sideshowbarker
2024-07-17 02:35:27 +09:00
Author: https://github.com/sgeisenh 🔰
Commit: c5360b1a5f
Pull-request: https://github.com/SerenityOS/serenity/pull/17291
Issue: https://github.com/SerenityOS/serenity/issues/17284
5 changed files with 26 additions and 7 deletions
|
@ -142,6 +142,12 @@ void CalculatorWidget::set_entry(Crypto::BigFraction value)
|
|||
update_display();
|
||||
}
|
||||
|
||||
void CalculatorWidget::set_typed_entry(Crypto::BigFraction value)
|
||||
{
|
||||
m_keypad.set_typed_value(move(value));
|
||||
update_display();
|
||||
}
|
||||
|
||||
void CalculatorWidget::update_display()
|
||||
{
|
||||
m_entry->set_text(m_keypad.to_deprecated_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue