Fixed a bug with argument boxes where the value wasn't saved correctly when using the mouse wheel to change the value

This commit is contained in:
biwa 2020-11-19 22:14:19 +01:00
parent b094786100
commit 82af8bfe56

View file

@ -37,6 +37,7 @@ namespace CodeImp.DoomBuilder.Controls
private TypeHandler typehandler;
private bool ignorebuttonchange;
private bool forcevalidate;
#endregion
@ -136,6 +137,11 @@ namespace CodeImp.DoomBuilder.Controls
combobox_Validating(sender, new CancelEventArgs());
button.Image = typehandler.BrowseImage;
}
else if(forcevalidate)
{
forcevalidate = false;
combobox_Validating(sender, new CancelEventArgs());
}
}
// Mouse wheel used
@ -148,6 +154,10 @@ namespace CodeImp.DoomBuilder.Controls
else if(e.Delta > 0)
scrollbuttons.Value -= 1;
}
else
{
forcevalidate = true; // Make sure that the value is validated
}
}
// Scroll buttons clicked