diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index fee9e45424..a99e4c29ef 100755 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -55,6 +55,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"; } @@ -80,6 +82,9 @@ BOOL LLPanelSnapshotInventory::postBuild() getChild(getWidthSpinnerName())->setAllowEdit(FALSE); getChild(getHeightSpinnerName())->setAllowEdit(FALSE); + getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); + + // Store settings at logout getImageSizeComboBox()->setCurrentByIndex(gSavedSettings.getS32("LastSnapshotToInventoryResolution")); getWidthSpinner()->setValue(gSavedSettings.getS32("LastSnapshotToInventoryWidth")); @@ -111,6 +116,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(); 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 20477a2652..5ed42f4c2a 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml @@ -59,6 +59,10 @@ label="Large (512x512)" name="Large(512x512)" value="[i512,i512]" /> +