diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-15 16:03:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-04-15 17:58:46 +0200 |
commit | e58edeb2aab087ec13c6d8fd19e91320a9073a92 (patch) | |
tree | e8988829c4b099adf70d2220f777ece3ba840a6e /basctl | |
parent | ada385f1cba427416c1e8517cb6a45b61ceff7b0 (diff) |
set cursor after thawed
Change-Id: I3e9ebee84c8a65b7231b0947e1044445b656780c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92282
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/IDEComboBox.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/basctl/source/basicide/IDEComboBox.cxx b/basctl/source/basicide/IDEComboBox.cxx index 1a3837091ec0..621a60d97b0b 100644 --- a/basctl/source/basicide/IDEComboBox.cxx +++ b/basctl/source/basicide/IDEComboBox.cxx @@ -408,6 +408,8 @@ void LanguageBox::FillBox() msCurrentText = m_xWidget->get_active_text(); ClearBox(); + sal_Int32 nSelPos = -1; + std::shared_ptr<LocalizationMgr> pCurMgr(GetShell()->GetCurLocalizationMgr()); if (pCurMgr->isLibraryLocalized()) { @@ -417,7 +419,6 @@ void LanguageBox::FillBox() Sequence<Locale> aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); sal_Int32 i, nCount = aLocaleSeq.getLength(); - sal_Int32 nSelPos = -1; for (i = 0; i < nCount; ++i) { bool bIsDefault = localesAreEqual(aDefaultLocale, pLocale[i]); @@ -437,19 +438,17 @@ void LanguageBox::FillBox() } if (nSelPos != -1) - { - m_xWidget->set_active(nSelPos); - msCurrentText = m_xWidget->get_active_text(); - } + msCurrentText = m_xWidget->get_text(nSelPos); } else { m_xWidget->append_text(msNotLocalizedStr); - m_xWidget->set_active(0); + nSelPos = 0; set_sensitive(false); } m_xWidget->thaw(); + m_xWidget->set_active(nSelPos); mbIgnoreSelect = false; } |