Skip to content
Snippets Groups Projects
Commit 773c4abc authored by Oz Linden's avatar Oz Linden
Browse files

MAINT-2082: fix deletion of an autoreplace list

parent 66fee673
No related branches found
No related tags found
No related merge requests found
...@@ -514,14 +514,27 @@ bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notifica ...@@ -514,14 +514,27 @@ bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notifica
void LLFloaterAutoReplaceSettings::onDeleteList() void LLFloaterAutoReplaceSettings::onDeleteList()
{ {
std::string listName= mListNames->getFirstSelected()->getColumn(0)->getValue().asString(); std::string listName = mListNames->getSelectedValue().asString();
mSettings.removeReplacementList(listName); // remove from the copy of settings if ( ! listName.empty() )
mReplacementsList->deleteSelectedItems(); // remove from the scrolling list {
if ( mSettings.removeReplacementList(listName) )
mSelectedListName.clear(); {
updateListNames(); LL_INFOS("AutoReplace")<<"deleted list '"<<listName<<"'"<<LL_ENDL;
updateListNamesControls(); mReplacementsList->deleteSelectedItems(); // remove from the scrolling list
updateReplacementsList(); mSelectedListName.clear();
updateListNames();
updateListNamesControls();
updateReplacementsList();
}
else
{
LL_WARNS("AutoReplace")<<"failed to delete list '"<<listName<<"'"<<LL_ENDL;
}
}
else
{
LL_DEBUGS("AutoReplace")<<"no list selected for delete"<<LL_ENDL;
}
} }
void LLFloaterAutoReplaceSettings::onExportList() void LLFloaterAutoReplaceSettings::onExportList()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment