mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-11 15:59:08 +01:00
Use BeginUpdate and EndUpdate when editing items in combobox
This commit is contained in:
parent
f676e6257e
commit
4a29f53694
@ -1944,18 +1944,22 @@ namespace DS4Windows
|
|||||||
if (nUDUpdateTime.Value == 1)
|
if (nUDUpdateTime.Value == 1)
|
||||||
{
|
{
|
||||||
int index = currentIndex;
|
int index = currentIndex;
|
||||||
|
cBUpdateTime.BeginUpdate();
|
||||||
cBUpdateTime.Items.Clear();
|
cBUpdateTime.Items.Clear();
|
||||||
cBUpdateTime.Items.Add(Properties.Resources.Hour);
|
cBUpdateTime.Items.Add(Properties.Resources.Hour);
|
||||||
cBUpdateTime.Items.Add(Properties.Resources.Day);
|
cBUpdateTime.Items.Add(Properties.Resources.Day);
|
||||||
cBUpdateTime.SelectedIndex = index;
|
cBUpdateTime.SelectedIndex = index;
|
||||||
|
cBUpdateTime.EndUpdate();
|
||||||
}
|
}
|
||||||
else if (cBUpdateTime.Items[0].ToString() == Properties.Resources.Hour)
|
else if (cBUpdateTime.Items[0].ToString() == Properties.Resources.Hour)
|
||||||
{
|
{
|
||||||
int index = currentIndex;
|
int index = currentIndex;
|
||||||
|
cBUpdateTime.BeginUpdate();
|
||||||
cBUpdateTime.Items.Clear();
|
cBUpdateTime.Items.Clear();
|
||||||
cBUpdateTime.Items.Add(Properties.Resources.Hours);
|
cBUpdateTime.Items.Add(Properties.Resources.Hours);
|
||||||
cBUpdateTime.Items.Add(Properties.Resources.Days);
|
cBUpdateTime.Items.Add(Properties.Resources.Days);
|
||||||
cBUpdateTime.SelectedIndex = index;
|
cBUpdateTime.SelectedIndex = index;
|
||||||
|
cBUpdateTime.EndUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user