diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2010-02-19 18:47:21 +0200 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2010-02-19 18:47:21 +0200 |
commit | 6a3ea6fa610bdaf7fb6aa6aa4304e20f2536cde5 (patch) | |
tree | 04106bc9e11b44d872f4d5aba6b3fa8a44497956 /indra/newview/llnavigationbar.cpp | |
parent | fa72384d339809b11c7ea03bf731e9bcf35e47f0 (diff) |
no ticket. minor changes. Comments cleaning up. The logic was NOT changed.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index f022bfeb4f..d42e4bc250 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -449,8 +449,14 @@ void LLNavigationBar::onLocationSelection() // Will not teleport to empty location. if (typed_location.empty()) return; - + //get selected item from combobox item LLSD value = mCmbLocation->getSelectedValue(); + /* since navbar list support autocompletion it contains several types of item: landmark, teleport hystory item, + * typed by user slurl or region name. Let's find out which type of item the user has selected + * to make decision about adding this location into typed history. see mSaveToLocationHistory + * Note: + * Only TYPED_REGION_SLURL item will be added into LLLocationHistory + */ if(value.has("item_type")) { @@ -480,7 +486,7 @@ void LLNavigationBar::onLocationSelection() case TELEPORT_HISTORY: //in case of teleport item was selected, teleport by position too. - case TYPED_REGION_SURL: + case TYPED_REGION_SLURL: if(value.has("global_pos")) { gAgent.teleportViaLocation(LLVector3d(value["global_pos"])); @@ -492,7 +498,7 @@ void LLNavigationBar::onLocationSelection() break; } } - //Let's parse surl or region name + //Let's parse slurl or region name std::string region_name; LLVector3 local_coords(128, 128, 0); @@ -541,7 +547,7 @@ void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos) return; LLLocationHistory* lh = LLLocationHistory::getInstance(); - //TODO*: do we need convert surl into readable format? + //TODO*: do we need convert slurl into readable format? std::string location; /*NOTE: * We can't use gAgent.getPositionAgent() in case of local teleport to build location. @@ -553,7 +559,7 @@ void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos) std::string tooltip (LLSLURL::buildSLURLfromPosGlobal(gAgent.getRegion()->getName(), global_agent_pos, false)); LLLocationHistoryItem item (location, - global_agent_pos, tooltip,TYPED_REGION_SURL);// we can add into history only TYPED location + global_agent_pos, tooltip,TYPED_REGION_SLURL);// we can add into history only TYPED location //Touch it, if it is at list already, add new location otherwise if ( !lh->touchItem(item) ) { lh->addItem(item); |