viewer#1594 Add a "Cancel" button to exit the "New List" prompt
And fix infinite loop in replaceList. mLists[search_index] was extending size of the list indefinetely.master
parent
9f00bb19b1
commit
3f150fbcf1
|
|
@ -536,11 +536,12 @@ LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LL
|
|||
S32 search_index;
|
||||
LLSD targetList;
|
||||
// The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30
|
||||
for ( search_index = 0, targetList = mLists[0];
|
||||
for ( search_index = 0;
|
||||
!listFound && search_index < mLists.size();
|
||||
search_index += 1, targetList = mLists[search_index]
|
||||
search_index += 1
|
||||
)
|
||||
{
|
||||
targetList = mLists[search_index];
|
||||
if ( targetList.isMap() )
|
||||
{
|
||||
if ( listNameMatches( targetList, listName) )
|
||||
|
|
|
|||
|
|
@ -422,7 +422,13 @@ bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification,
|
|||
|
||||
LLSD newList = notification["payload"]["list"];
|
||||
|
||||
if ( response.has("listname") && response["listname"].isString() )
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (option != 1) // Must also match RenameAutoReplaceList
|
||||
{
|
||||
// user cancelled
|
||||
return false;
|
||||
}
|
||||
else if (response.has("listname") && response["listname"].isString() )
|
||||
{
|
||||
std::string newName = response["listname"].asString();
|
||||
LLAutoReplaceSettings::setListName(newList, newName);
|
||||
|
|
|
|||
|
|
@ -3100,9 +3100,13 @@ Would you be my friend?
|
|||
<input name="listname" type="text"/>
|
||||
<button
|
||||
default="true"
|
||||
index="0"
|
||||
index="1"
|
||||
name="SetName"
|
||||
text="OK"/>
|
||||
<button
|
||||
index="0"
|
||||
name="Cancel"
|
||||
text="Cancel"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue