summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-11-25 11:51:49 -0800
committerJames Cook <james@lindenlab.com>2009-11-25 11:51:49 -0800
commitef46d4077ca4aad322aabfe545885be136577c8a (patch)
treed5ad52ccec6cd0f0d0e3b9aa134a9068e2827686 /indra/newview/llviewermenu.cpp
parent446702d7620b124b1f34599e89c5fc6d12ec390d (diff)
Hook up nav bar For Sale icon to buy land functionality.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f853a70c87..4307002980 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5628,12 +5628,7 @@ class LLShowFloater : public view_listener_t
}
else if (floater_name == "buy land")
{
- if (LLViewerParcelMgr::getInstance()->selectionEmpty())
- {
- LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal());
- }
-
- LLViewerParcelMgr::getInstance()->startBuyLand();
+ handle_buy_land();
}
else if (floater_name == "script errors")
{
@@ -5843,7 +5838,15 @@ BOOL enable_buy_land(void*)
LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false);
}
-
+void handle_buy_land()
+{
+ LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance();
+ if (vpm->selectionEmpty())
+ {
+ vpm->selectParcelAt(gAgent.getPositionGlobal());
+ }
+ vpm->startBuyLand();
+}
class LLObjectAttachToAvatar : public view_listener_t
{