From 12d19eec352e82314ac1ff3dfbfd5c9b9aa74a31 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 3 Apr 2015 12:48:20 +0300 Subject: MAINT-5041 FIXED Current Window snapshot option is restored. Hide height/width spinners when selecting this option. --- indra/newview/llpanelsnapshotinventory.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llpanelsnapshotinventory.cpp') 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(getWidthSpinnerName())->setAllowEdit(FALSE); getChild(getHeightSpinnerName())->setAllowEdit(FALSE); + + getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); return LLPanelSnapshot::postBuild(); } @@ -89,6 +93,13 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info) getChild("save_btn")->setEnabled(have_snapshot); } +void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) +{ + BOOL current_window_selected = (getChild(getImageSizeComboName())->getCurrentIndex() == 3); + getChild(getWidthSpinnerName())->setVisible(!current_window_selected); + getChild(getHeightSpinnerName())->setVisible(!current_window_selected); +} + void LLPanelSnapshotInventory::onSend() { LLFloaterSnapshot::saveTexture(); -- cgit v1.2.3