[Libreoffice-commits] core.git: basctl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 15 15:59:29 UTC 2020
basctl/source/basicide/IDEComboBox.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit e58edeb2aab087ec13c6d8fd19e91320a9073a92
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 15 16:03:06 2020 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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;
}
More information about the Libreoffice-commits
mailing list