Kaydet (Commit) 32304eb0 authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#124730 an attempt to remove entry that isn't there

Change-Id: If382f0419c8ea0a3b99c85942c05ee1e5a627e76
Reviewed-on: https://gerrit.libreoffice.org/70795Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst fad018d6
...@@ -282,7 +282,9 @@ void SfxManageStyleSheetPage::UpdateName_Impl( weld::ComboBox* pBox, ...@@ -282,7 +282,9 @@ void SfxManageStyleSheetPage::UpdateName_Impl( weld::ComboBox* pBox,
{ {
// it is the current entry, which name was modified // it is the current entry, which name was modified
const bool bSelect = pBox->get_active_text() == aBuf; const bool bSelect = pBox->get_active_text() == aBuf;
pBox->remove_text(aBuf); int nOldIndex = pBox->find_text(aBuf);
if (nOldIndex != -1)
pBox->remove(nOldIndex);
pBox->append_text(rNew); pBox->append_text(rNew);
if (bSelect) if (bSelect)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment