SL-14900 remove created landmark when clicking Cancel button

master
Mnikolenko Productengine 2021-03-29 18:32:02 +03:00
parent 33eadba6ef
commit 100fa900c0
3 changed files with 6 additions and 2 deletions

View File

@ -216,7 +216,7 @@ void LLFloaterCreateLandmark::onCreateFolderClicked()
if (!folder_name.empty())
{
inventory_func_type func = boost::bind(&LLFloaterCreateLandmark::folderCreatedCallback, this, _1);
LLUUID test = gInventory.createNewCategory(mLandmarksID, LLFolderType::FT_NONE, folder_name, func);
gInventory.createNewCategory(mLandmarksID, LLFolderType::FT_NONE, folder_name, func);
gInventory.notifyObservers();
}
}
@ -282,6 +282,8 @@ void LLFloaterCreateLandmark::onSaveClicked()
void LLFloaterCreateLandmark::onCancelClicked()
{
LLUUID item_id = mItem->getUUID();
remove_inventory_item(item_id, NULL);
closeFloater();
}

View File

@ -66,7 +66,6 @@ private:
LLLineEditor* mLandmarkTitleEditor;
LLTextEditor* mNotesEditor;
LLUUID mLandmarksID;
LLUUID mItemID;
LLLandmarksInventoryObserver* mInventoryObserver;
LLPointer<LLInventoryItem> mItem;

View File

@ -4,6 +4,9 @@
show_title="false"
can_minimize="false"
can_close="false"
header_height="10"
bg_opaque_image="Window_NoTitle_Foreground"
bg_alpha_image="Window_NoTitle_Background"
height="305"
layout="topleft"
name="create_landmark"