From 81b683f83b759e78d1e0b598e412d86991791d39 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 1 Sep 2016 16:40:41 +0300 Subject: MAINT-6686 FIXED [VOB] Outfit Snapshot floater should be resized independently of general Snapshot floater --- indra/newview/llfloatersnapshot.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloatersnapshot.cpp') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index f6d20c84d0..664668f2f7 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -158,8 +158,6 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate { LLSnapshotLivePreview* previewp = getPreviewView(); - BOOL advanced = gSavedSettings.getBOOL("AdvanceSnapshot"); - //BD - Automatically calculate the size of our snapshot window to enlarge // the snapshot preview to its maximum size, this is especially helpfull // for pretty much every aspect ratio other than 1:1. @@ -175,16 +173,16 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate } S32 floater_width = 224.f; - if(advanced) + if(mAdvanced) { floater_width = floater_width + panel_width; } LLUICtrl* thumbnail_placeholder = floaterp->getChild("thumbnail_placeholder"); - thumbnail_placeholder->setVisible(advanced); + thumbnail_placeholder->setVisible(mAdvanced); thumbnail_placeholder->reshape(panel_width, thumbnail_placeholder->getRect().getHeight()); - floaterp->getChild("image_res_text")->setVisible(advanced); - floaterp->getChild("file_size_label")->setVisible(advanced); + floaterp->getChild("image_res_text")->setVisible(mAdvanced); + floaterp->getChild("file_size_label")->setVisible(mAdvanced); if(!floaterp->isMinimized()) { floaterp->reshape(floater_width, floaterp->getRect().getHeight()); @@ -996,7 +994,9 @@ BOOL LLFloaterSnapshot::postBuild() getChild("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); - + + getChild("retract_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); + getChild("extend_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); // Filters LLComboBox* filterbox = getChild("filters_combobox"); @@ -1038,6 +1038,7 @@ BOOL LLFloaterSnapshot::postBuild() impl->mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); impl->updateLayout(this); @@ -1110,12 +1111,18 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->adjustToFitScreen(this, FALSE); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); impl->updateLayout(this); // Initialize default tab. getChild("panel_container")->getCurrentPanel()->onOpen(LLSD()); } +void LLFloaterSnapshot::onExtendFloater() +{ + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); +} + //virtual void LLFloaterSnapshotBase::onClose(bool app_quitting) { -- cgit v1.2.3