summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshot.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-09-26 01:34:59 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2025-04-18 01:37:16 +0200
commit67d1838cc0fe5cacbb9daf9fcb8d08b40556b5dd (patch)
tree30337ea47aa188ae0f475cf7ab274aad897e3aa7 /indra/newview/llpanelsnapshot.cpp
parent85cf1d7ebefe41eaad8b71cfd6d0d2fac72423ec (diff)
Force snapshot update when opening a snapshot panel and the resolution is "Current Window" to determine correct image size and upload cost
Diffstat (limited to 'indra/newview/llpanelsnapshot.cpp')
-rw-r--r--indra/newview/llpanelsnapshot.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 32c9f6f402..56c0294dbe 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -37,6 +37,7 @@
// newview
#include "llsidetraypanelcontainer.h"
+#include "llsnapshotlivepreview.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llagentbenefits.h"
@@ -99,6 +100,17 @@ void LLPanelSnapshot::onOpen(const LLSD& key)
{
getParentByType<LLFloater>()->notify(LLSD().with("image-format-change", true));
}
+
+ // If resolution is set to "Current Window", force a snapshot update
+ // each time a snapshot panel is opened to determine the correct
+ // image size (and upload fee) depending on the snapshot type.
+ if (mSnapshotFloater && getChild<LLUICtrl>(getImageSizeComboName())->getValue().asString() == "[i0,i0]")
+ {
+ if (LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView())
+ {
+ preview->mForceUpdateSnapshot = true;
+ }
+ }
}
LLSnapshotModel::ESnapshotFormat LLPanelSnapshot::getImageFormat() const