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/lllocationinputctrl.cpp | |
parent | 860a82863966435bea680d8541f051e99a6c226c (diff) | |
parent | 24d146a9ff26af1f3e4cf5af2c5238ca42e2c6c7 (diff) |
Merged in my DEV-35401 "doubleton" fix.
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 94abd128c4..3880ea91eb 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -54,6 +54,7 @@ #include "llsidetray.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" +#include "llviewercontrol.h" //============================================================================ /* @@ -330,6 +331,13 @@ void LLLocationInputCtrl::onFocusLost() LLUICtrl::onFocusLost(); refreshLocation(); } +void LLLocationInputCtrl::draw(){ + + if(!hasFocus()){ + refreshLocation(); + } + LLComboBox::draw(); +} void LLLocationInputCtrl::onInfoButtonClicked() { @@ -341,8 +349,7 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked() LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); // Floater "Add Landmark" functionality moved to Side Tray - // TODO* Disable floater "Add Landmark" call - LLFloaterReg::showInstance("add_landmark"); + //LLFloaterReg::showInstance("add_landmark"); } void LLLocationInputCtrl::onAgentParcelChange() @@ -387,8 +394,10 @@ void LLLocationInputCtrl::refreshLocation() // Update location field. std::string location_name; + LLAgent::ELocationFormat format = (gSavedSettings.getBOOL("ShowCoordinatesOption") ? + LLAgent::LOCATION_FORMAT_FULL: LLAgent::LOCATION_FORMAT_NORMAL); - if (!gAgent.buildLocationString(location_name, LLAgent::LOCATION_FORMAT_NORMAL)) + if (!gAgent.buildLocationString(location_name,format)) location_name = "Unknown"; setText(location_name); |