FIRE-23582: Fix texture picker opens wrong floater when pressing space in preview mode

master
Ansariel 2019-02-08 20:18:35 +01:00
parent 6880057bdb
commit d0be7ba28b
1 changed files with 19 additions and 1 deletions

View File

@ -1700,7 +1700,25 @@ BOOL LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char)
{
if( ' ' == uni_char )
{
showPicker(TRUE);
// <FS:Ansariel> Texture preview mode
//showPicker(TRUE);
if (!mPreviewMode)
{
showPicker(TRUE);
//grab textures first...
LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE));
//...then start full inventory fetch.
LLInventoryModelBackgroundFetch::instance().start();
}
else if (!mIsMasked)
{
// Open the preview floater for the texture
LLSD params;
params["uuid"] = getValue();
params["preview_only"] = TRUE;
LLFloaterReg::showInstance("preview_texture", params, TRUE);
}
// </FS:Ansariel>
return TRUE;
}
return LLUICtrl::handleUnicodeCharHere(uni_char);