diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-09-22 19:59:31 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-09-27 21:11:33 +0200 |
commit | eccbef8e9c4d2570bf192dd68a1dc0a162413075 (patch) | |
tree | f360f85f68af00e6abd90cfd3a80693b65f70666 /vcl | |
parent | 995ec792ccc3434db00cc51238e759685f0b2918 (diff) |
tdf#157168 GtkSpinButton ignores out-of-range value instead of limiting
(to range)
Change-Id: Ib25276ccea18b45756ac2769cb00cb9d7db0c400
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157125
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 17bbfe5d497e..70930a1267c0 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -17461,11 +17461,6 @@ public: m_aCustomFont.use_custom_font(&rFont, u"spinbutton"); } - void set_update_policy_if_valid() - { - gtk_spin_button_set_update_policy(m_pButton, GTK_UPDATE_IF_VALID); - } - virtual void disable_notify_events() override { g_signal_handler_block(m_pButton, m_nValueChangedSignalId); @@ -24312,13 +24307,7 @@ public: virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit) override { - std::unique_ptr<weld::SpinButton> xButton(weld_spin_button(id)); - if (xButton) - { - GtkInstanceSpinButton& rButton = dynamic_cast<GtkInstanceSpinButton&>(*xButton); - rButton.set_update_policy_if_valid(); - } - return std::make_unique<weld::MetricSpinButton>(std::move(xButton), eUnit); + return std::make_unique<weld::MetricSpinButton>(weld_spin_button(id), eUnit); } virtual std::unique_ptr<weld::FormattedSpinButton> weld_formatted_spin_button(const OString &id) override |