diff options
| author | brad kittenbrink <brad@lindenlab.com> | 2009-08-05 18:45:18 -0700 |
|---|---|---|
| committer | brad kittenbrink <brad@lindenlab.com> | 2009-08-05 18:45:18 -0700 |
| commit | a8d216e194327c7bee8a42c983f7f2ca01adb385 (patch) | |
| tree | 76819d6e78c7e7cf0c5e54d319847f4731c77205 /indra/newview/llpanelplaceinfo.cpp | |
| parent | 860a82863966435bea680d8541f051e99a6c226c (diff) | |
| parent | 24d146a9ff26af1f3e4cf5af2c5238ca42e2c6c7 (diff) | |
Merged in my DEV-35401 "doubleton" fix.
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
| -rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index b43828e681..31d76ca4e2 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -51,6 +51,7 @@ #include "llagent.h" #include "llfloaterworldmap.h" #include "llinventorymodel.h" +#include "lllandmarkactions.h" #include "lltexturectrl.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" @@ -488,6 +489,26 @@ void LLPanelPlaceInfo::onCommitTitleOrNote(LANDMARK_INFO_TYPE type) } } +void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) +{ + std::string name = mTitleEditor->getText(); + std::string desc = mNotesEditor->getText(); + + LLStringUtil::trim(name); + LLStringUtil::trim(desc); + + // If typed name is empty use the parcel name instead. + if (name.empty()) + { + name = mParcelName->getText() + "; " + mRegionName->getText(); + } + + LLStringUtil::replaceChar(desc, '\n', ' '); + // If no folder chosen use the "Landmarks" folder. + LLLandmarkActions::createLandmarkHere(name, desc, + folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK)); +} + void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) { if (mMinHeight > 0) |
