LLTextureCtrl now creates texture picker when clicked. (behavior if child element handled click was inverted)

This commit is contained in:
Shyotl
2012-03-22 09:36:13 -05:00
parent 5ce6f7eb7d
commit 3d6511f4e1

View File

@@ -1339,7 +1339,7 @@ void LLTextureCtrl::closeFloater()
BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_HAND);
getWindow()->setCursor(mBorder->parentPointInView(x,y) ? UI_CURSOR_HAND : UI_CURSOR_ARROW);
return TRUE;
}
@@ -1350,15 +1350,17 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
if(!mEnable) return FALSE;
BOOL handled = LLUICtrl::handleMouseDown( x, y , mask );
if( handled )
if (!handled && mBorder->parentPointInView(x, y))
{
showPicker(FALSE);
//grab textures first...
LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE));
//...then start full inventory fetch.
LLInventoryModelBackgroundFetch::instance().start();
handled = TRUE;
}
return handled;
}