MAINT-5041 FIXED Current Window snapshot option is restored. Hide height/width spinners when selecting this option.
parent
4fc901d703
commit
62db9f6ba7
|
|
@ -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<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE);
|
||||
getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE);
|
||||
|
||||
getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1));
|
||||
|
||||
|
||||
// <FS:Ansariel> 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<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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue