From d0be7ba28b2fb80f82004be9ca21ae7eec76c4e7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 8 Feb 2019 20:18:35 +0100 Subject: [PATCH] FIRE-23582: Fix texture picker opens wrong floater when pressing space in preview mode --- indra/newview/lltexturectrl.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c71a044944..009016ae31 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1700,7 +1700,25 @@ BOOL LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char) { if( ' ' == uni_char ) { - showPicker(TRUE); + // 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); + } + // return TRUE; } return LLUICtrl::handleUnicodeCharHere(uni_char);