diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-05-28 21:38:00 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-05-28 21:38:00 +0300 |
commit | b08ba3fa7bc9e6309891e510fbfb5c4e2b5c922e (patch) | |
tree | 3e5294e3b8ff07778e6134ed9dd41458386032ac /indra/newview/llviewerwindow.cpp | |
parent | b9ab6c3644da02bed6941dc8df433fb1c626f8c7 (diff) | |
parent | de8275b14b30bf754cdba1da867cb2e6c2783639 (diff) |
Merge branch 'main' into marchcat/2505-merge
# Conflicts:
# .github/workflows/qatest.yaml
# indra/llcommon/llsdutil.h
# indra/llui/llflatlistview.h
# indra/newview/llinventorybridge.cpp
# indra/newview/lloutfitgallery.cpp
# indra/newview/lloutfitgallery.h
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 10dcda9dee..e74df0917f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4870,12 +4870,12 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) } } -bool LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, bool show_ui, bool show_hud, bool do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) +bool LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, bool show_ui, bool show_hud, bool do_rebuild, bool show_balance, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) { LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL; LLPointer<LLImageRaw> raw = new LLImageRaw; - bool success = rawSnapshot(raw, image_width, image_height, true, false, show_ui, show_hud, do_rebuild); + bool success = rawSnapshot(raw, image_width, image_height, true, false, show_ui, show_hud, do_rebuild, show_balance); if (success) { @@ -4936,14 +4936,14 @@ void LLViewerWindow::resetSnapshotLoc() const bool LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type) { - return rawSnapshot(raw, preview_width, preview_height, false, false, show_ui, show_hud, do_rebuild, no_post, type); + return rawSnapshot(raw, preview_width, preview_height, false, false, show_ui, show_hud, do_rebuild, no_post, gSavedSettings.getBOOL("RenderBalanceInSnapshot"), type); } // Saves the image from the screen to a raw image // Since the required size might be bigger than the available screen, this method rerenders the scene in parts (called subimages) and copy // the results over to the final raw image. bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, - bool keep_window_aspect, bool is_texture, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) + bool keep_window_aspect, bool is_texture, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, bool show_balance, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) { if (!raw) { @@ -5001,6 +5001,8 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // If the user wants the UI, limit the output size to the available screen size image_width = llmin(image_width, window_width); image_height = llmin(image_height, window_height); + + setBalanceVisible(show_balance); } S32 original_width = 0; @@ -5078,11 +5080,13 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei } else { + setBalanceVisible(true); return false; } if (raw->isBufferInvalid()) { + setBalanceVisible(true); return false; } @@ -5258,6 +5262,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei { send_agent_resume(); } + setBalanceVisible(true); return ret; } @@ -5723,6 +5728,14 @@ void LLViewerWindow::setProgressCancelButtonVisible( bool b, const std::string& } } +void LLViewerWindow::setBalanceVisible(bool visible) +{ + if (gStatusBar) + { + gStatusBar->setBalanceVisible(visible); + } +} + LLProgressView *LLViewerWindow::getProgressView() const { return mProgressView; |