summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-23 21:42:20 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-07-25 08:45:52 -0400
commit2d595bd00cde3c0501ce44b6ab2b11d53347828d (patch)
tree139ee5c8a9230ab2175505bba38ef7d3e9c75c48 /indra
parent7dd3f5db0b7da458a49df8ae2f40138a83021dec (diff)
Fix findChild calls during draw from LLFloaterSnapshot
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatersnapshot.cpp9
-rw-r--r--indra/newview/llfloatersnapshot.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index e03b11e572..ddc567c029 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -192,7 +192,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
}
}
- bool use_freeze_frame = floaterp->getChild<LLUICtrl>("freeze_frame_check")->getValue().asBoolean();
+ bool use_freeze_frame = floaterp->mFreezeFrameCheck && floaterp->mFreezeFrameCheck->getValue().asBoolean();
if (use_freeze_frame)
{
@@ -720,7 +720,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool
new_width = spanel->getTypedPreviewWidth();
new_height = spanel->getTypedPreviewHeight();
- // Limit custom size for inventory snapshots to 512x512 px.
+ // Limit custom size for inventory snapshots to 2048x2048 px.
if (getActiveSnapshotType(view) == LLSnapshotModel::SNAPSHOT_TEXTURE)
{
new_width = llmin(new_width, MAX_TEXTURE_SIZE);
@@ -1002,8 +1002,9 @@ bool LLFloaterSnapshot::postBuild()
getChild<LLUICtrl>("layer_types")->setValue("colors");
getChildView("layer_types")->setEnabled(false);
- getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
- childSetCommitCallback("freeze_frame_check", ImplBase::onCommitFreezeFrame, this);
+ mFreezeFrameCheck = getChild<LLUICtrl>("freeze_frame_check");
+ mFreezeFrameCheck->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
+ mFreezeFrameCheck->setCommitCallback(&ImplBase::onCommitFreezeFrame, this);
getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this);
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index ac5a472b03..6df851b839 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -72,6 +72,7 @@ protected:
LLUICtrl* mThumbnailPlaceholder;
LLUICtrl *mRefreshBtn, *mRefreshLabel;
LLUICtrl *mSucceessLblPanel, *mFailureLblPanel;
+ LLUICtrl* mFreezeFrameCheck = nullptr;
};
class LLFloaterSnapshotBase::ImplBase