From 7d6f5f19fd6db5d83537bec1a7d36666ce9d9c2a Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 29 Apr 2022 20:37:08 +0100 Subject: [PATCH] LibGUI: Add AllowCallback parameter to ComboBox::set_text() --- Userland/Libraries/LibGUI/ComboBox.cpp | 4 ++-- Userland/Libraries/LibGUI/ComboBox.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp index 4f82b9fea3..feefd6521a 100644 --- a/Userland/Libraries/LibGUI/ComboBox.cpp +++ b/Userland/Libraries/LibGUI/ComboBox.cpp @@ -274,9 +274,9 @@ String ComboBox::text() const return m_editor->text(); } -void ComboBox::set_text(String const& text) +void ComboBox::set_text(String const& text, AllowCallback allow_callback) { - m_editor->set_text(text); + m_editor->set_text(text, allow_callback); } void ComboBox::set_only_allow_values_from_model(bool b) diff --git a/Userland/Libraries/LibGUI/ComboBox.h b/Userland/Libraries/LibGUI/ComboBox.h index 07955c3f7b..615d2f0534 100644 --- a/Userland/Libraries/LibGUI/ComboBox.h +++ b/Userland/Libraries/LibGUI/ComboBox.h @@ -21,7 +21,7 @@ public: virtual ~ComboBox() override; String text() const; - void set_text(String const&); + void set_text(String const&, AllowCallback = AllowCallback::Yes); void open(); void close();