Skip to content
Snippets Groups Projects
Commit 12d19eec authored by Mnikolenko ProductEngine's avatar Mnikolenko ProductEngine
Browse files

MAINT-5041 FIXED Current Window snapshot option is restored. Hide height/width...

MAINT-5041 FIXED Current Window snapshot option is restored. Hide height/width spinners when selecting this option.
parent a3cc40c0
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,8 @@ class LLPanelSnapshotInventory
/*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();
......
......@@ -59,6 +59,10 @@
label="Large (512x512)"
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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment