[Core] Fix: Convert Decimal control values to int32 for Int settings (#134)
Attempting to set decimal values to int properties tends to throw errors. ;-)
This commit is contained in:
parent
4299b0613b
commit
5e8ac004c7
1 changed files with 2 additions and 2 deletions
|
|
@ -246,7 +246,7 @@ namespace Observatory.UI
|
||||||
|
|
||||||
trackBar.ValueChanged += (sender, e) =>
|
trackBar.ValueChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
setting.SetValue(_plugin.Settings, trackBar.Value);
|
setting.SetValue(_plugin.Settings, Convert.ToInt32(trackBar.Value));
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ namespace Observatory.UI
|
||||||
|
|
||||||
numericUpDown.ValueChanged += (sender, e) =>
|
numericUpDown.ValueChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
setting.SetValue(_plugin.Settings, numericUpDown.Value);
|
setting.SetValue(_plugin.Settings, Convert.ToInt32(numericUpDown.Value));
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue