diff --git a/indra/newview/llfloatercreatelandmark.cpp b/indra/newview/llfloatercreatelandmark.cpp index 68f5ab143b2e18adba14ba210bf6a44ba7e14a3e..52093c3f56cb1e9446e20165c75840258d03ec33 100644 --- a/indra/newview/llfloatercreatelandmark.cpp +++ b/indra/newview/llfloatercreatelandmark.cpp @@ -158,16 +158,6 @@ void LLFloaterCreateLandmark::onOpen(const LLSD& key) populateFoldersList(dest_folder); } -void LLFloaterCreateLandmark::onClose(bool app_quitting) -{ - if (!mItem.isNull()) - { - LLUUID item_id = mItem->getUUID(); - remove_inventory_item(item_id, NULL); - mItem = nullptr; - } -} - void LLFloaterCreateLandmark::setLandmarkInfo(const LLUUID &folder_id) { LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); @@ -202,7 +192,7 @@ void LLFloaterCreateLandmark::setLandmarkInfo(const LLUUID &folder_id) mLandmarkTitleEditor->setText(name); } - LLLandmarkActions::createLandmarkHere(name, "", folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)); + LLLandmarkActions::createLandmarkHere(name, "", folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK)); } bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right) @@ -219,17 +209,6 @@ void LLFloaterCreateLandmark::populateFoldersList(const LLUUID &folder_id) mFolderCombo->removeall(); // Put the "My Favorites" folder first in list. - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id); - if (!favorites_cat) - { - LL_WARNS() << "Cannot find the favorites folder" << LL_ENDL; - } - else - { - mFolderCombo->add(getString("favorites_bar"), favorites_cat->getUUID()); - } - // Add the "Landmarks" category. const LLViewerInventoryCategory* lmcat = gInventory.getCategory(mLandmarksID); if (!lmcat) @@ -242,6 +221,17 @@ void LLFloaterCreateLandmark::populateFoldersList(const LLUUID &folder_id) mFolderCombo->add(cat_full_name, lmcat->getUUID()); } + LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id); + if (!favorites_cat) + { + LL_WARNS() << "Cannot find the favorites folder" << LL_ENDL; + } + else + { + mFolderCombo->add(getString("favorites_bar"), favorites_cat->getUUID()); + } + typedef std::vector<folder_pair_t> folder_vec_t; folder_vec_t folders; // Sort the folders by their full name. @@ -368,8 +358,6 @@ void LLFloaterCreateLandmark::onSaveClicked() gInventory.updateItem(new_item); gInventory.notifyObservers(); - mItem = nullptr; - closeFloater(); } @@ -380,7 +368,6 @@ void LLFloaterCreateLandmark::onCancelClicked() { LLUUID item_id = mItem->getUUID(); remove_inventory_item(item_id, NULL); - mItem = nullptr; } closeFloater(); } diff --git a/indra/newview/llfloatercreatelandmark.h b/indra/newview/llfloatercreatelandmark.h index 7896ad9e65d91057abc663221fb00c1edeb80943..80ba91192b68c4abeb6c136e4a17dd1b5fc199ae 100644 --- a/indra/newview/llfloatercreatelandmark.h +++ b/indra/newview/llfloatercreatelandmark.h @@ -47,7 +47,6 @@ class LLFloaterCreateLandmark final : BOOL postBuild() override; void onOpen(const LLSD& key) override; - void onClose(bool app_quitting) override; void setItem(const uuid_set_t& items); void updateItem(const uuid_set_t& items, U32 mask); diff --git a/indra/newview/skins/default/xui/en/floater_create_landmark.xml b/indra/newview/skins/default/xui/en/floater_create_landmark.xml index 6735e43f79ec8c32136ac8abb9ebf69bd9d756a9..632daaec7ec33badaa4b5179927d6ab9d23334aa 100644 --- a/indra/newview/skins/default/xui/en/floater_create_landmark.xml +++ b/indra/newview/skins/default/xui/en/floater_create_landmark.xml @@ -3,7 +3,7 @@ can_resize="false" show_title="false" can_minimize="false" - can_close="true" + can_close="false" header_height="10" bg_opaque_image="Window_NoTitle_Foreground" bg_alpha_image="Window_NoTitle_Background"