From 6a56d048c0d4e49032b6b85a93f9caa7c107abea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 11 Feb 2020 20:19:04 -0500 Subject: [PATCH] Don't confuse the user by showing loading when refreshing item's experience Also reorganize some code in that area to be cleaner --- indra/newview/llfloaterproperties.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 52a1f21b1..2dac6344f 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -300,8 +300,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) { getChildView("LabelItemExperienceTitle")->setVisible(TRUE); LLTextBox* tb = getChild("LabelItemExperience"); - tb->setText(getString("loading_experience")); - tb->setVisible(TRUE); + if (tb->getValue().asUUID().isNull()) + { + tb->setText(getString("loading_experience")); + tb->setVisible(TRUE); + } std::string url = std::string(); if(object && object->getRegion()) { @@ -592,14 +595,10 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) void LLFloaterProperties::setAssociatedExperience(LLHandle hInfo, const LLSD& experience) { - LLFloaterProperties* info = hInfo.get(); - if(info) + LLFloaterProperties* info = hInfo.get(); + if (info && experience.has(LLExperienceCache::EXPERIENCE_ID)) { - LLUUID id; - if (experience.has(LLExperienceCache::EXPERIENCE_ID)) - { - id = experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); - } + auto id = experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); if (id.notNull()) { //info->getChild("LabelItemExperience")->setText(LLSLURL("experience", id, "profile").getSLURLString();