summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersnapshot.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-29 15:43:21 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-29 15:43:21 -0700
commit74b0c86e48387e2154cb2acf03f626ca11229bce (patch)
tree0c74138a6d0c60eb5dffcc745464b58a6b315036 /indra/newview/llfloatersnapshot.cpp
parent9598e2f4cedd3dc36d447086273e0ed97967bbf9 (diff)
parent1a7909517368206d54407e54b9332aed1e4c9863 (diff)
Merge brad/2549-downrez-controls into release/2024.09-ExtraFPS (#2864)
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rw-r--r--indra/newview/llfloatersnapshot.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index f7c82621fb..fb4537f22a 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -324,7 +324,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
bool got_bytes = previewp && previewp->getDataSize() > 0;
bool got_snap = previewp && previewp->getSnapshotUpToDate();
- // *TODO: Separate maximum size for Web images from postcards
LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
LLLocale locale(LLLocale::USER_LOCALE);
@@ -343,7 +342,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
image_res_tb->setTextArg("[HEIGHT]", llformat("%d", previewp->getEncodedImageHeight()));
}
- floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
+ LLTextBox* file_size_label = floater->getChild<LLTextBox>("file_size_label");
+ file_size_label->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
LLUIColor color = LLUIColorTable::instance().getColor( "LabelTextColor" );
if (shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD
@@ -359,7 +359,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
color = LLUIColor(LLColor4::red);
}
- floater->getChild<LLUICtrl>("file_size_label")->setColor(color);
+ file_size_label->setColor(color);
+ file_size_label->setReadOnlyColor(color); // field gets disabled during upload
// Update the width and height spinners based on the corresponding resolution combos. (?)
switch(shot_type)
@@ -1296,7 +1297,8 @@ bool LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
void LLFloaterSnapshotBase::ImplBase::updateLivePreview()
{
- if (ImplBase::updatePreviewList(true) && mFloater)
+ // don't update preview for hidden floater
+ if (mFloater && mFloater->isInVisibleChain() && ImplBase::updatePreviewList(true))
{
LL_DEBUGS() << "changed" << LL_ENDL;
updateControls(mFloater);