summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelsnapshot.cpp')
-rw-r--r--indra/newview/llpanelsnapshot.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 90e32f973f..2f29e758c6 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -124,15 +124,11 @@ LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer()
// virtual
void LLPanelSnapshot::updateCustomResControls()
{
+ // Only show width/height spinners and the aspect ratio checkbox
+ // when a custom resolution is chosen.
LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName());
- S32 selected_idx = combo->getFirstSelectedIndex();
- const bool enable = selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected
-
- getChild<LLUICtrl>(getWidthSpinnerName())->setEnabled(enable);
- getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(enable);
- getChild<LLUICtrl>(getHeightSpinnerName())->setEnabled(enable);
- getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(enable);
- enableAspectRatioCheckbox(enable);
+ const bool show = combo->getFirstSelectedIndex() == (combo->getItemCount() - 1);
+ getChild<LLUICtrl>(getImageSizePanelName())->setVisible(show);
}
void LLPanelSnapshot::updateImageQualityLevel()