Fixed a focus issue that prevented face media floater from updating on face change if said floater had current focus.

This commit is contained in:
Shyotl
2013-06-15 20:08:05 -05:00
parent ad89c3e401
commit be94087bee
5 changed files with 27 additions and 1 deletions

View File

@@ -203,7 +203,7 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mAutoPlay->clear();
self->mAutoScale->clear();
self->mAutoZoom ->clear();
self->mCurrentURL->clear();
self->mCurrentURL->setValue("");
self->mFirstClick->clear();
self->mHeightPixels->clear();
self->mHomeURL->clear();

View File

@@ -66,6 +66,21 @@ LLTool::~LLTool()
}
}
BOOL LLTool::handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
{
BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
// This behavior was moved here from LLViewerWindow::handleAnyMouseClick, so it can be selectively overridden by LLTool subclasses.
if(down && result)
{
// This is necessary to force clicks in the world to cause edit
// boxes that might have keyboard focus to relinquish it, and hence
// cause a commit to update their value. JC
gFocusMgr.setKeyboardFocus(NULL);
}
return result;
}
BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
{

View File

@@ -55,6 +55,7 @@ public:
virtual BOOL isView() const { return FALSE; }
// Virtual functions inherited from LLMouseHandler
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);

View File

@@ -92,6 +92,15 @@ LLToolPie::LLToolPie()
{
}
BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
{
BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
// This override DISABLES the keyboard focus reset that LLTool::handleAnyMouseClick adds.
// LLToolPie will do the right thing in its pick callback.
return result;
}
BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
{

View File

@@ -46,6 +46,7 @@ public:
LLToolPie( );
// Virtual functions inherited from LLMouseHandler
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);