summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaceinfo.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
commitdb5cda26676f376f18816013c0c5e3fbad5b20d0 (patch)
treeb50e52262d34f55b4eaf35a3a1952007ef0a69de /indra/newview/llpanelplaceinfo.cpp
parent3c85899ee0db4a90d03ec687e514a31c1befe34e (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1211 https://svn.aws.productengine.com/secondlife/pe/stable-1@1228 -> viewer-2.0.0-3
QA: New movement and camera controls. Test all movement and camera behavior against spec and expected behaviors, including sitting & standing. Many other changes to the bottom bar. Changes to local chat behavior.
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r--indra/newview/llpanelplaceinfo.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index ea05b666db..40275be82f 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"
@@ -487,6 +488,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)