Merge branch 'master' of git://github.com/Lirusaito/SingularityViewer
Conflicts: indra/llmessage/llurlrequest.cpp indra/newview/llvoavatar.cpp
This commit is contained in:
@@ -2443,7 +2443,6 @@ BOOL LLLineEditor::evaluateFloat()
|
||||
{
|
||||
bool success = false;
|
||||
std::string expr = getText();
|
||||
LLStringUtil::toUpper(expr);
|
||||
|
||||
// user deleted the contents, nothing to evaluate -- MC
|
||||
if (expr.empty())
|
||||
|
||||
@@ -92,9 +92,15 @@ bool LLTrans::parseStrings(const std::string& xml_filename, const std::set<std::
|
||||
return true;
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_GET_TRANS("Translate string");
|
||||
|
||||
//static
|
||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
|
||||
{
|
||||
// Don't care about time as much as call count. Make sure we're not
|
||||
// calling LLTrans::getString() in an inner loop. JC
|
||||
LLFastTimer timer(FTM_GET_TRANS);
|
||||
|
||||
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
||||
|
||||
if (iter != sStringTemplates.end())
|
||||
@@ -122,7 +128,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
|
||||
{
|
||||
// Don't care about time as much as call count. Make sure we're not
|
||||
// calling LLTrans::getString() in an inner loop. JC
|
||||
//V3: LLFastTimer timer(FTM_GET_TRANS);
|
||||
LLFastTimer timer(FTM_GET_TRANS);
|
||||
|
||||
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
||||
if (iter != sStringTemplates.end())
|
||||
@@ -141,7 +147,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
|
||||
//static
|
||||
bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
|
||||
{
|
||||
//V3: LLFastTimer timer(FTM_GET_TRANS);
|
||||
LLFastTimer timer(FTM_GET_TRANS);
|
||||
|
||||
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
||||
if (iter != sStringTemplates.end())
|
||||
|
||||
@@ -293,8 +293,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
LLFastTimer::DeclareTimer FTM_FOCUS_FIRST_ITEM("Focus First Item");
|
||||
|
||||
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
|
||||
{
|
||||
LLFastTimer _(FTM_FOCUS_FIRST_ITEM);
|
||||
// try to select default tab group child
|
||||
LLCtrlQuery query = getTabOrderQuery();
|
||||
// sort things such that the default tab group is at the front
|
||||
|
||||
@@ -893,6 +893,39 @@ LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LLView* LLView::childFromPoint(S32 x, S32 y, bool recur)
|
||||
{
|
||||
if (!getVisible())
|
||||
return NULL;
|
||||
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
{
|
||||
S32 local_x = x - viewp->getRect().mLeft;
|
||||
S32 local_y = y - viewp->getRect().mBottom;
|
||||
if (!viewp->visibleAndContains(local_x, local_y))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Here we've found the first (frontmost) visible child at this level
|
||||
// containing the specified point. Is the caller asking us to drill
|
||||
// down and return the innermost leaf child at this point, or just the
|
||||
// top-level child?
|
||||
if (recur)
|
||||
{
|
||||
LLView* leaf(viewp->childFromPoint(local_x, local_y, recur));
|
||||
// Maybe viewp is already a leaf LLView, or maybe it has children
|
||||
// but this particular (x, y) point falls between them. If the
|
||||
// recursive call returns non-NULL, great, use that; else just use
|
||||
// viewp.
|
||||
return leaf? leaf : viewp;
|
||||
}
|
||||
return viewp;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
@@ -1507,7 +1540,7 @@ BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const
|
||||
//-----------------------------------------------------------------------------
|
||||
// getChildView()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Views");
|
||||
static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets");
|
||||
|
||||
LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
|
||||
{
|
||||
|
||||
@@ -394,11 +394,9 @@ public:
|
||||
void setShape(const LLRect& new_rect, bool by_user = false);
|
||||
virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
|
||||
virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
|
||||
|
||||
virtual BOOL canSnapTo(const LLView* other_view);
|
||||
|
||||
virtual void setSnappedTo(const LLView* snap_view);
|
||||
|
||||
|
||||
// inherited from LLFocusableElement
|
||||
/* virtual */ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
/* virtual */ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
|
||||
@@ -478,6 +476,7 @@ public:
|
||||
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect); // Display mToolTipMsg if no child handles it.
|
||||
|
||||
/*virtual*/ const std::string& getName() const;
|
||||
/*virtual*/ void onMouseCaptureLost();
|
||||
/*virtual*/ BOOL hasMouseCapture();
|
||||
@@ -485,6 +484,8 @@ public:
|
||||
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const;
|
||||
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const;
|
||||
|
||||
virtual LLView* childFromPoint(S32 x, S32 y, bool recur=false);
|
||||
|
||||
template <class T> T* findChild(const std::string& name)
|
||||
{
|
||||
return getChild<T>(name,true,false);
|
||||
|
||||
Reference in New Issue
Block a user