summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersnapshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp34
1 files changed, 28 insertions, 6 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index dbc643881e..b27a42cb8e 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -367,8 +367,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
- enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
- setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
LLPanelSnapshot* active_panel = getActivePanel(floater);
@@ -478,8 +476,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
default:
break;
}
-
- if (previewp)
+ setAspectRatioCheckboxValue(floater, !floater->impl.mAspectRatioCheckOff && gSavedSettings.getBOOL("KeepAspectForSnapshot"));
+
+ if (previewp)
{
previewp->setSnapshotType(shot_type);
previewp->setSnapshotFormat(shot_format);
@@ -554,7 +553,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
{
view->impl.setStatus(Impl::STATUS_READY);
LL_DEBUGS() << "updating snapshot" << LL_ENDL;
- previewp->updateSnapshot(TRUE);
+ previewp->mForceUpdateSnapshot = TRUE;
}
}
@@ -627,6 +626,13 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
if (view)
{
+ LLPanelSnapshot* active_panel = getActivePanel(view);
+ if (checked && active_panel)
+ {
+ LLComboBox* combo = view->getChild<LLComboBox>(active_panel->getImageSizeComboName());
+ combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index
+ }
+
LLSnapshotLivePreview* previewp = getPreviewView(view) ;
if(previewp)
{
@@ -691,7 +697,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
}
view->impl.mAspectRatioCheckOff = !enable_cb;
- enableAspectRatioCheckbox(view, enable_cb);
+
if (previewp)
{
previewp->mKeepAspectRatio = keep_aspect;
@@ -1193,6 +1199,22 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
void LLFloaterSnapshot::onClose(bool app_quitting)
{
getParent()->setMouseOpaque(FALSE);
+
+ //unfreeze everything, hide fullscreen preview
+ LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView(this);
+ if (previewp)
+ {
+ previewp->setVisible(FALSE);
+ previewp->setEnabled(FALSE);
+ }
+
+ gSavedSettings.setBOOL("FreezeTime", FALSE);
+ impl.mAvatarPauseHandles.clear();
+
+ if (impl.mLastToolset)
+ {
+ LLToolMgr::getInstance()->setCurrentToolset(impl.mLastToolset);
+ }
}
// virtual