mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
Minor behavior tweak for apply all/none
Button closes form when modifying all indexes, so don't bother loading them back to the GUI. The form will immediately close after. Only read indexes from the GUI if they're kept.
This commit is contained in:
parent
5c70e41b76
commit
70020dc7e4
1 changed files with 3 additions and 4 deletions
|
@ -54,30 +54,29 @@ public partial class TechRecordEditor : Form
|
|||
|
||||
private void B_All_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
if (ModifierKeys == Keys.Shift)
|
||||
{
|
||||
Record.ClearRecordFlags();
|
||||
Record.SetRecordFlags(true, Record.Permit.RecordCountUsed);
|
||||
}
|
||||
else if (ModifierKeys == Keys.Control)
|
||||
{
|
||||
Save();
|
||||
Span<ushort> moves = stackalloc ushort[4];
|
||||
Entity.GetMoves(moves);
|
||||
Record.SetRecordFlags(moves);
|
||||
}
|
||||
else
|
||||
{
|
||||
Record.ClearRecordFlags();
|
||||
Record.SetRecordFlags();
|
||||
}
|
||||
LoadRecords();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void B_None_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
Record.ClearRecordFlags();
|
||||
LoadRecords();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue