[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 17 14:45:15 UTC 2020
vcl/source/app/salvtables.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 0ba9ea50dcae6739e93f81dff762f2656054bb93
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 17 10:38:13 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 17 15:44:36 2020 +0100
improve changed_by_direct_pick
Change-Id: I5007c428b30a2827f5ba1a85eefdb8deed826b5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88855
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index ba8869e6ad6e..5b2a288c8bc5 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6249,10 +6249,12 @@ private:
DECL_LINK(EntryActivateHdl, Edit&, bool);
DECL_LINK(SelectHdl, ::ComboBox&, void);
WeldTextFilter m_aTextFilter;
+ bool m_bInSelect;
public:
SalInstanceComboBoxWithEdit(::ComboBox* pComboBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
: SalInstanceComboBox<::ComboBox>(pComboBox, pBuilder, bTakeOwnership)
, m_aTextFilter(m_aEntryInsertTextHdl)
+ , m_bInSelect(false)
{
m_xComboBox->SetModifyHdl(LINK(this, SalInstanceComboBoxWithEdit, ChangeHdl));
m_xComboBox->SetSelectHdl(LINK(this, SalInstanceComboBoxWithEdit, SelectHdl));
@@ -6267,7 +6269,7 @@ public:
virtual bool changed_by_direct_pick() const override
{
- return !m_xComboBox->IsModifyByKeyboard();
+ return m_bInSelect && !m_xComboBox->IsModifyByKeyboard();
}
virtual void set_entry_message_type(weld::EntryMessageType eType) override
@@ -6370,7 +6372,9 @@ IMPL_LINK_NOARG(SalInstanceComboBoxWithEdit, ChangeHdl, Edit&, void)
IMPL_LINK_NOARG(SalInstanceComboBoxWithEdit, SelectHdl, ::ComboBox&, void)
{
+ m_bInSelect = true;
signal_changed();
+ m_bInSelect = false;
}
IMPL_LINK_NOARG(SalInstanceComboBoxWithEdit, EntryActivateHdl, Edit&, bool)
More information about the Libreoffice-commits
mailing list