From f98fa678205a4575ea2590994c863527c29c2ab9 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 16 Nov 2023 10:18:42 +0100 Subject: SL-20563 Add 'No Post' option to Snapshot floater --- indra/newview/llfloatersnapshot.cpp | 18 ++++++++++++++++-- indra/newview/llfloatersnapshot.h | 1 + .../newview/skins/default/xui/en/floater_snapshot.xml | 12 ++++++++++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 4 files changed, 28 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 6b9d4580dc..4806fe9625 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -461,8 +461,8 @@ void LLFloaterSnapshotBase::ImplBase::onClickAutoSnap(LLUICtrl *ctrl, void* data { LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; gSavedSettings.setBOOL( "AutoSnapshot", check->get() ); - - LLFloaterSnapshotBase *view = (LLFloaterSnapshotBase *)data; + + LLFloaterSnapshotBase *view = (LLFloaterSnapshotBase *)data; if (view) { view->impl->checkAutoSnapshot(view->getPreviewView()); @@ -470,6 +470,17 @@ void LLFloaterSnapshotBase::ImplBase::onClickAutoSnap(LLUICtrl *ctrl, void* data } } +// static +void LLFloaterSnapshotBase::ImplBase::onClickNoPost(LLUICtrl *ctrl, void* data) +{ + BOOL no_post = ((LLCheckBoxCtrl*)ctrl)->get(); + gSavedSettings.setBOOL("RenderDisablePostProcessing", no_post); + + LLFloaterSnapshotBase* view = (LLFloaterSnapshotBase*)data; + view->getPreviewView()->updateSnapshot(TRUE, TRUE); + view->impl->updateControls(view); +} + // static void LLFloaterSnapshotBase::ImplBase::onClickFilter(LLUICtrl *ctrl, void* data) { @@ -997,6 +1008,9 @@ BOOL LLFloaterSnapshot::postBuild() getChild("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); + getChild("no_post_check")->setValue(gSavedSettings.getBOOL("RenderDisablePostProcessing")); + childSetCommitCallback("no_post_check", ImplBase::onClickNoPost, this); + getChild("retract_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); getChild("extend_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 7fc62a2746..89cb2bc809 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -100,6 +100,7 @@ public: static void onClickNewSnapshot(void* data); static void onClickAutoSnap(LLUICtrl *ctrl, void* data); + static void onClickNoPost(LLUICtrl *ctrl, void* data); static void onClickFilter(LLUICtrl *ctrl, void* data); static void onClickUICheck(LLUICtrl *ctrl, void* data); static void onClickHUDCheck(LLUICtrl *ctrl, void* data); diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index fcd24d83bb..0866594625 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -115,7 +115,7 @@ top_delta="0" width="31" /> + -- cgit v1.2.3