diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-05 09:44:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-05 15:20:15 +0200 |
commit | 78f2eaafbcf595c5789531f4cf0b91586255bd94 (patch) | |
tree | 891a74dd0e6ea58183e16ce021a21f192f7f841d /vcl | |
parent | 68961653f9af29b332039e50459e29d33c623013 (diff) |
tdf#137250 fire changed on typeahead in combobox without menu active
Change-Id: If296b303ad98d945840f39ebab27a019ac881932
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103950
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 4282f17d5415..c16099ad7432 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -14131,7 +14131,7 @@ private: while (nActive < nCount && separator_function(nActive)) ++nActive; if (nActive < nCount) - set_active_including_mru(nActive); + set_active_including_mru(nActive, true); bDone = true; } else if (nKeyMod == KEY_MOD2 && !m_bPopupActive) @@ -14151,7 +14151,7 @@ private: while (nActive >= nStartBound && separator_function(nActive)) --nActive; if (nActive >= nStartBound) - set_active_including_mru(nActive); + set_active_including_mru(nActive, true); bDone = true; } break; @@ -14167,7 +14167,7 @@ private: while (nActive < nCount && separator_function(nActive)) ++nActive; if (nActive < nCount) - set_active_including_mru(nActive); + set_active_including_mru(nActive, true); bDone = true; } break; @@ -14182,7 +14182,7 @@ private: while (nActive >= nStartBound && separator_function(nActive)) --nActive; if (nActive >= nStartBound) - set_active_including_mru(nActive); + set_active_including_mru(nActive, true); bDone = true; } break; @@ -14329,12 +14329,12 @@ private: return get_active_including_mru(); } - void set_selected_entry(int nSelect) + void set_typeahead_selected_entry(int nSelect) { if (m_bPopupActive) tree_view_set_cursor(nSelect); else - set_active_including_mru(nSelect); + set_active_including_mru(nSelect, true); } virtual vcl::StringEntryIdentifier CurrentEntry(OUString& out_entryText) const override @@ -14364,7 +14364,7 @@ private: if (nSelect >= nCount) nSelect = nCount ? nCount-1 : -1; - set_selected_entry(nSelect); + set_typeahead_selected_entry(nSelect); } static void signalGrabBroken(GtkWidget*, GdkEventGrabBroken *pEvent, gpointer widget) @@ -14525,7 +14525,7 @@ private: return tree_view_get_cursor(); } - void set_active_including_mru(int pos) + void set_active_including_mru(int pos, bool bInteractive) { disable_notify_events(); @@ -14541,6 +14541,9 @@ private: m_bChangedByMenu = false; enable_notify_events(); + + if (bInteractive && !m_bPopupActive && !m_pEntry) + signal_changed(); } int find_text_including_mru(const OUString& rStr, bool bSearchMRU) const @@ -14923,7 +14926,7 @@ public: { if (m_nMRUCount && pos != -1) pos += (m_nMRUCount + 1); - set_active_including_mru(pos); + set_active_including_mru(pos, false); } virtual OUString get_active_text() const override |