Sync
Includes: MAINT-3541 (crash in std::vector >::reserve) MAINT-3364 FIXED Call clearSelection() from root_folder MAINT-3621 FIXED Set name to "Unnamed" if object's name consists of whitespaces. MAINT-3412 add gpu_table line with distinct Intel Iris Pro OpenGL regex to match new MBP with forced Intel graphics MAINT-3119 FIXED Return common chars for triggers that matches the prefix. MAINT-3661 Fix for crash when uploading corrupt .dae file. MAINT-3671 FIXED Rename title when new tab is added. MAINT-3465 FIXED Add check mark to selected entry. BUG-5537 FIX reverting breaking changes to pectorals and belly. MAINT-535 FIXED The teleport SLAPP is changed to UNTRUSTED_THROTTLE. Confirmation dialog for teleporting via slapp is added.
This commit is contained in:
@@ -1358,6 +1358,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
{
|
||||
S32 in_len = in_str.length();
|
||||
|
||||
//return whole trigger, if received text equals to it
|
||||
item_map_t::iterator it;
|
||||
for (it = mActive.begin(); it != mActive.end(); ++it)
|
||||
{
|
||||
@@ -1365,7 +1366,24 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
if (gesture)
|
||||
{
|
||||
const std::string& trigger = gesture->getTrigger();
|
||||
|
||||
if (!LLStringUtil::compareInsensitive(in_str, trigger))
|
||||
{
|
||||
*out_str = trigger;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//return common chars, if more than one trigger matches the prefix
|
||||
std::string rest_of_match = "";
|
||||
std::string buf = "";
|
||||
for (it = mActive.begin(); it != mActive.end(); ++it)
|
||||
{
|
||||
LLMultiGesture* gesture = (*it).second;
|
||||
if (gesture)
|
||||
{
|
||||
const std::string& trigger = gesture->getTrigger();
|
||||
|
||||
if (in_len > (S32)trigger.length())
|
||||
{
|
||||
// too short, bail out
|
||||
@@ -1376,8 +1394,39 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
LLStringUtil::truncate(trigger_trunc, in_len);
|
||||
if (!LLStringUtil::compareInsensitive(in_str, trigger_trunc))
|
||||
{
|
||||
*out_str = trigger;
|
||||
return TRUE;
|
||||
if (rest_of_match.compare("") == 0)
|
||||
{
|
||||
rest_of_match = trigger.substr(in_str.size());
|
||||
}
|
||||
std::string cur_rest_of_match = trigger.substr(in_str.size());
|
||||
buf = "";
|
||||
S32 i=0;
|
||||
|
||||
while (i<rest_of_match.length() && i<cur_rest_of_match.length())
|
||||
{
|
||||
if (rest_of_match[i]==cur_rest_of_match[i])
|
||||
{
|
||||
buf.push_back(rest_of_match[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
rest_of_match = "";
|
||||
}
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (rest_of_match.compare("") == 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (buf.compare("") != 0)
|
||||
{
|
||||
rest_of_match = buf;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user