mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 04:30:49 +12:00
BeforeUpload fixes
BeforeUpload form didn't accurately preselect destination for ImageFileDestinations
This commit is contained in:
parent
11948a11e4
commit
358c72c1d1
|
@ -35,6 +35,7 @@ public partial class BeforeUploadControl : UserControl
|
|||
{
|
||||
public delegate void EventHandler(string currentDestination);
|
||||
public event EventHandler InitCompleted;
|
||||
private EDataType UploadDestination;
|
||||
|
||||
public BeforeUploadControl()
|
||||
{
|
||||
|
@ -43,6 +44,7 @@ public BeforeUploadControl()
|
|||
|
||||
public void Init(TaskInfo info)
|
||||
{
|
||||
UploadDestination = info.UploadDestination;
|
||||
switch (info.DataType)
|
||||
{
|
||||
case EDataType.Image:
|
||||
|
@ -113,8 +115,10 @@ public void InitCapture(TaskSettings taskSettings)
|
|||
|
||||
flp.Controls.OfType<RadioButton>().ForEach(x =>
|
||||
{
|
||||
x.Checked = (x.Tag is ImageDestination && (ImageDestination)x.Tag == taskSettings.ImageDestination) ||
|
||||
(x.Tag is FileDestination && (FileDestination)x.Tag == taskSettings.ImageFileDestination);
|
||||
if (UploadDestination == EDataType.Image)
|
||||
x.Checked = (x.Tag is ImageDestination && (ImageDestination)x.Tag == taskSettings.ImageDestination);
|
||||
else
|
||||
x.Checked = (x.Tag is FileDestination && (FileDestination)x.Tag == taskSettings.ImageFileDestination);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue