summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotinventory.cpp
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-08-31 11:17:28 -0700
committercallum_linden <none@none>2015-08-31 11:17:28 -0700
commit1db2c7276d0bb1039ad8be9240201732ad5387cd (patch)
treea2bc6f6f80772cc459f23a075ba3bc0b75b5de48 /indra/newview/llpanelsnapshotinventory.cpp
parent0ad81961cd5aea97231959fd31daa22dd2d8908a (diff)
parent1be63209331d509396bd7ee79302d511fe83d72e (diff)
Merge with viewer-release
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rwxr-xr-xindra/newview/llpanelsnapshotinventory.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index c8a201a5c8..c55e230b5e 100755
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -48,6 +48,8 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
+ void onResolutionCommit(LLUICtrl* ctrl);
+
private:
/*virtual*/ std::string getWidthSpinnerName() const { return "inventory_snapshot_width"; }
/*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; }
@@ -72,6 +74,8 @@ BOOL LLPanelSnapshotInventory::postBuild()
{
getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE);
getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE);
+
+ getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1));
return LLPanelSnapshot::postBuild();
}
@@ -89,6 +93,13 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info)
getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot);
}
+void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
+{
+ BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3);
+ getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected);
+ getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected);
+}
+
void LLPanelSnapshotInventory::onSend()
{
LLFloaterSnapshot::saveTexture();