summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-11 12:53:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-11 17:24:09 +0100
commitbb861c972451af1ecdec75f37d32504167eff2ec (patch)
treeb2dba252c69eb477785f6a1eec999690f71f8b64
parent1cec037fb349c8535cd1e09f00c0eb08e45fd957 (diff)
ensure the module combobox gets updated with the current selection
Change-Id: Ia9bf71c1890d9f2700a67ad9a3727dbf140c0492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88446 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--basctl/source/basicide/IDEComboBox.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/basctl/source/basicide/IDEComboBox.cxx b/basctl/source/basicide/IDEComboBox.cxx
index 240eafb63d39..5279861365d1 100644
--- a/basctl/source/basicide/IDEComboBox.cxx
+++ b/basctl/source/basicide/IDEComboBox.cxx
@@ -208,7 +208,6 @@ void LibBox::FillBox()
maCurrentText = m_xWidget->get_active_text();
- m_xWidget->set_active(0);
ClearBox();
// create list box entries
@@ -229,7 +228,11 @@ void LibBox::FillBox()
m_xWidget->thaw();
- m_xWidget->set_active_text(maCurrentText);
+ int nIndex = m_xWidget->find_text(maCurrentText);
+ if (nIndex != -1)
+ m_xWidget->set_active(nIndex);
+ else
+ m_xWidget->set_active(0);
maCurrentText = m_xWidget->get_active_text();
mbIgnoreSelect = false;
}
@@ -290,12 +293,9 @@ IMPL_LINK_NOARG(LibBox, FocusInHdl, weld::Widget&, void)
IMPL_LINK_NOARG(LibBox, FocusOutHdl, weld::Widget&, void)
{
- if (!m_xWidget
- ->has_focus()) // comboboxes can be comprised of multiple widgets, ensure all have lost focus
- {
- mbIgnoreSelect = true;
+ // comboboxes can be comprised of multiple widgets, ensure all have lost focus
+ if (!m_xWidget->has_focus())
mbFillBox = true;
- }
}
void LibBox::Select()