diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-04-03 12:48:20 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-04-03 12:48:20 +0300 |
commit | 12d19eec352e82314ac1ff3dfbfd5c9b9aa74a31 (patch) | |
tree | 0ee654cbb40c8f40193afad1f950e3d7f726cfbd /indra | |
parent | a3cc40c06efcc0618c69b750e88e326d399f9bd5 (diff) |
MAINT-5041 FIXED Current Window snapshot option is restored. Hide height/width spinners when selecting this option.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llpanelsnapshotinventory.cpp | 11 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml | 4 |
2 files changed, 15 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(); diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml index ea579c6dae..d019a0a310 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml @@ -60,6 +60,10 @@ name="Large(512x512)" value="[i512,i512]" /> <combo_box.item + label="Current Window(512x512)" + name="CurrentWindow" + value="[i0,i0]" /> + <combo_box.item label="Custom" name="Custom" value="[i-1,i-1]" /> |