diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2009-12-29 18:14:44 +0200 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2009-12-29 18:14:44 +0200 |
commit | f036105dc919203f950bc97cbfe3f5fbeaa420d6 (patch) | |
tree | c4277aaa22da13e06fe86329901bf20dd78984ca /indra | |
parent | 8f91db2e80d0e66432847f7056775a567a8b4fe6 (diff) |
fixed bug EXT-3726 Cannot edit pasted text in Address Bar
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lllocationinputctrl.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 98ca339f0c..404e266806 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -634,6 +634,8 @@ void LLLocationInputCtrl::refreshLocation() { location_name = "???"; } + // store human-readable location to compare it in changeLocationPresentation() + mHumanReadableLocation = location_name; setText(location_name); } @@ -823,11 +825,11 @@ void LLLocationInputCtrl::updateWidgetlayout() void LLLocationInputCtrl::changeLocationPresentation() { - //change location presentation only if user does not select anything and + //change location presentation only if user does not select/past anything and //human-readable region name is being displayed std::string text = mTextEntry->getText(); LLStringUtil::trim(text); - if(mTextEntry && !mTextEntry->hasSelection() && !LLSLURL::isSLURL(text)) + if(mTextEntry && !mTextEntry->hasSelection() && text == mHumanReadableLocation ) { //needs unescaped one mTextEntry->setText(LLAgentUI::buildSLURL(false)); diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 0211062b05..7959fab2de 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -169,6 +169,8 @@ private: std::string mAddLandmarkTooltip; std::string mEditLandmarkTooltip; + // this field holds a human-readable form of the location string, it is needed to be able to compare copy-pated value and real location + std::string mHumanReadableLocation; }; #endif |