From e7ef0512a27adce621b8523f6cb81a8daa73e12d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 16 Nov 2011 18:57:41 +0200 Subject: EXP-1562 WIP Disable custom resolution controls by default (when "Current Window" is pre-select). --- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llpanelsnapshot.cpp | 10 ++++++++++ indra/newview/llpanelsnapshot.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 63fa93b1a1..181570138e 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1726,7 +1726,7 @@ void LLFloaterSnapshot::Impl::setWorking(LLFloaterSnapshot* floater, bool workin LLPanelSnapshot* active_panel = getActivePanel(floater); if (active_panel) { - active_panel->setCtrlsEnabled(!working); + active_panel->enableControls(!working); } } diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index fdae521ac5..90e32f973f 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -74,6 +74,16 @@ LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshot::getImageFormat() const return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; } +void LLPanelSnapshot::enableControls(BOOL enable) +{ + setCtrlsEnabled(enable); + if (enable) + { + // Make sure only relevant controls are enabled/shown. + updateCustomResControls(); + } +} + LLSpinCtrl* LLPanelSnapshot::getWidthSpinner() { return getChild(getWidthSpinnerName()); diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h index a49782a3e0..7adb2fabc7 100644 --- a/indra/newview/llpanelsnapshot.h +++ b/indra/newview/llpanelsnapshot.h @@ -52,6 +52,7 @@ public: virtual void enableAspectRatioCheckbox(BOOL enable); virtual LLFloaterSnapshot::ESnapshotFormat getImageFormat() const; virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings + void enableControls(BOOL enable); protected: LLSideTrayPanelContainer* getParentContainer(); -- cgit v1.2.3