diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-09 13:05:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-01-09 17:12:28 +0100 |
commit | 6bbb384bf6334eb9f207f4098820e6852e21325a (patch) | |
tree | f9f5da6c6efc7b528e2b8365324227aef9048995 /vcl/source | |
parent | e87be6db93860f33bc7141dc8ba9ddf6430ae2c0 (diff) |
Resolves: tdf#122348 make return in spinbutton signal value change
before going on to close the dialog afterwards
Change-Id: I9764512a944e52b0d2bff2d11c8cf74c057e2623
Reviewed-on: https://gerrit.libreoffice.org/66024
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 813154ba465f..34c86b8fe960 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2576,6 +2576,7 @@ private: DECL_LINK(LoseFocusHdl, Control&, void); DECL_LINK(OutputHdl, Edit&, bool); DECL_LINK(InputHdl, sal_Int64*, TriState); + DECL_LINK(ActivateHdl, Edit&, bool); double toField(int nValue) const { @@ -2598,6 +2599,7 @@ public: m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl)); m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl)); + m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); } virtual int get_value() const override @@ -2657,6 +2659,8 @@ public: virtual ~SalInstanceSpinButton() override { + if (Edit* pEdit = m_xButton->GetSubEdit()) + pEdit->SetActivateHdl(Link<Edit&, bool>()); m_xButton->SetInputHdl(Link<sal_Int64*, TriState>()); m_xButton->SetOutputHdl(Link<Edit&, bool>()); m_xButton->SetLoseFocusHdl(Link<Control&, void>()); @@ -2665,6 +2669,13 @@ public: } }; +IMPL_LINK_NOARG(SalInstanceSpinButton, ActivateHdl, Edit&, bool) +{ + // tdf#122348 return pressed to end dialog + signal_value_changed(); + return false; +} + IMPL_LINK_NOARG(SalInstanceSpinButton, UpDownHdl, SpinField&, void) { signal_value_changed(); |