basctl/source/basicide/IDEComboBox.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit e58edeb2aab087ec13c6d8fd19e91320a9073a92 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 15 16:03:06 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Apr 15 17:58:46 2020 +0200 set cursor after thawed Change-Id: I3e9ebee84c8a65b7231b0947e1044445b656780c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92282 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits