Commits

Anonymous committed 53abb23

fixed bug EXT-3726 Cannot edit pasted text in Address Bar

  • Participants
  • Parent commits 258a861
  • Branches product-engine

Comments (0)

Files changed (2)

indra/newview/lllocationinputctrl.cpp

 	{
 		location_name = "???";
 	}
+	// store human-readable location to compare it in changeLocationPresentation()
+	mHumanReadableLocation = location_name;
 	setText(location_name);
 }
 
 
 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));

indra/newview/lllocationinputctrl.h

 
 	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