diff options
author | James Cook <james@lindenlab.com> | 2009-11-25 11:51:49 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-25 11:51:49 -0800 |
commit | ef46d4077ca4aad322aabfe545885be136577c8a (patch) | |
tree | d5ad52ccec6cd0f0d0e3b9aa134a9068e2827686 /indra/newview/llviewermenu.cpp | |
parent | 446702d7620b124b1f34599e89c5fc6d12ec390d (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.cpp | 17 |
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 { |