summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-11-16 18:57:41 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-11-16 18:57:41 +0200
commite7ef0512a27adce621b8523f6cb81a8daa73e12d (patch)
tree826f354a609b57db9a878dfe88fa19fc9caa70ce /indra
parent557a64f8076666be767eea7567e3375aa71aa1e4 (diff)
EXP-1562 WIP Disable custom resolution controls by default (when "Current Window" is pre-select).
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatersnapshot.cpp2
-rw-r--r--indra/newview/llpanelsnapshot.cpp10
-rw-r--r--indra/newview/llpanelsnapshot.h1
3 files changed, 12 insertions, 1 deletions
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<LLSpinCtrl>(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();