mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 03:41:47 +00:00
Script Editor: fixed a crash when the find/replace dialog was opened and the previously selected script tabs do not exist anymore. Fixes #993
This commit is contained in:
parent
53c4952986
commit
124d87129d
1 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
findbox.Text = findtext;
|
||||
findbox.SelectAll();
|
||||
findbox.Items.AddRange(findtexts.ToArray());
|
||||
findinbox.SelectedIndex = searchmode;
|
||||
findinbox.SelectedIndex = searchmode > findinbox.Items.Count - 1 ? 0 : searchmode;
|
||||
findmatchcase.Checked = matchcase;
|
||||
findwholeword.Checked = matchwholeword;
|
||||
|
||||
|
@ -186,7 +186,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
replacebox.MaxDropDownItems = MAX_DROPDOWN_ITEMS;
|
||||
replacebox.Text = replacetext;
|
||||
replacebox.Items.AddRange(replacetexts.ToArray());
|
||||
replaceinbox.SelectedIndex = searchmode;
|
||||
replaceinbox.SelectedIndex = searchmode > replaceinbox.Items.Count - 1 ? 0 : searchmode;
|
||||
replacematchcase.Checked = matchcase;
|
||||
replacewholeword.Checked = matchwholeword;
|
||||
|
||||
|
|
Loading…
Reference in a new issue