[Libreoffice-commits] core.git: vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jan 9 16:12:50 UTC 2019
vcl/source/app/salvtables.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 6bbb384bf6334eb9f207f4098820e6852e21325a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 9 13:05:16 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 9 17:12:28 2019 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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();
More information about the Libreoffice-commits
mailing list