diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-22 17:05:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-22 21:39:42 +0200 |
commit | fcce0642c101429247a8be886df5a469aeb390a2 (patch) | |
tree | e7f2c85af84408b3076792f11f8b96dcb6cf4ac9 /svtools | |
parent | 8bf3e3fbdb708a75237a120d4f6fc46fe67dbbb9 (diff) |
tdf#133043 explicitly set the combobox edit text
because earlier we set it to "" rather that set_active(-1) so its
still at the same active pos with the wrong text so setting a new
active pos that's the same as the old active pos is a nop from
the vcl case
the original code used Edit::SetText so leave the logic as it
is traditionally rather than try to change that
Change-Id: I520d1c0371579850d073d37295ccc7d852298aaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94699
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index f47408e49b60..e60494a51097 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -795,8 +795,7 @@ void FontNameBox::set_active_or_entry_text(const OUString& rText) const int nFound = m_xComboBox->find_text(rText); if (nFound != -1) m_xComboBox->set_active(nFound); - else - m_xComboBox->set_entry_text(rText); + m_xComboBox->set_entry_text(rText); } FontStyleBox::FontStyleBox(std::unique_ptr<weld::ComboBox> p) @@ -984,8 +983,7 @@ void FontSizeBox::set_active_or_entry_text(const OUString& rText) const int nFound = m_xComboBox->find_text(rText); if (nFound != -1) m_xComboBox->set_active(nFound); - else - m_xComboBox->set_entry_text(rText); + m_xComboBox->set_entry_text(rText); } IMPL_LINK(FontSizeBox, ReformatHdl, weld::Widget&, rWidget, void) |