Skip to content

Commit 67d1838

Browse files
committed
Force snapshot update when opening a snapshot panel and the resolution is "Current Window" to determine correct image size and upload cost
1 parent 85cf1d7 commit 67d1838

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

indra/newview/llpanelsnapshot.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
// newview
3939
#include "llsidetraypanelcontainer.h"
40+
#include "llsnapshotlivepreview.h"
4041
#include "llviewercontrol.h" // gSavedSettings
4142

4243
#include "llagentbenefits.h"
@@ -99,6 +100,17 @@ void LLPanelSnapshot::onOpen(const LLSD& key)
99100
{
100101
getParentByType<LLFloater>()->notify(LLSD().with("image-format-change", true));
101102
}
103+
104+
// If resolution is set to "Current Window", force a snapshot update
105+
// each time a snapshot panel is opened to determine the correct
106+
// image size (and upload fee) depending on the snapshot type.
107+
if (mSnapshotFloater && getChild<LLUICtrl>(getImageSizeComboName())->getValue().asString() == "[i0,i0]")
108+
{
109+
if (LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView())
110+
{
111+
preview->mForceUpdateSnapshot = true;
112+
}
113+
}
102114
}
103115

104116
LLSnapshotModel::ESnapshotFormat LLPanelSnapshot::getImageFormat() const

indra/newview/skins/default/xui/ja/panel_snapshot_inventory.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<spinner label="" name="inventory_snapshot_height"/>
1717
<check_box label="縦横比の固定" name="inventory_keep_aspect_check"/>
1818
<text name="hint_lbl">
19-
画像をテクスチャとして保存する場合は、いずれかの正方形を選択してください
19+
画像をインベントリに保存するには L$[UPLOAD_COST] の費用がかかります。画像をテクスチャとして保存するには平方形式の 1 つを選択してください
2020
</text>
2121
<button label="キャンセル" name="cancel_btn"/>
2222
<button label="保存" name="save_btn"/>

0 commit comments

Comments
 (0)