mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-07 22:59:14 +08:00
Fix the command is cleared after repeated
This commit is contained in:
parent
2dc8dc734b
commit
f4fc0ef3c5
@ -208,12 +208,11 @@ namespace GrasscutterTools.Forms
|
||||
{
|
||||
Logger.I(TAG, $"SetCommand(\"{command}\")");
|
||||
var oldCommand = CmbCommand.Text;
|
||||
CmbCommand.Text = (ModifierKeys == Keys.Shift) ?
|
||||
(string.IsNullOrEmpty(oldCommand) ? command : $"{oldCommand} | {command}")
|
||||
: command;
|
||||
if (ModifierKeys == Keys.Shift && !string.IsNullOrEmpty(oldCommand))
|
||||
command = $"{oldCommand} | {command}";
|
||||
AddCommandToList(command);
|
||||
if (ChkAutoCopy.Checked)
|
||||
CopyCommand();
|
||||
AddCommandToList(command);
|
||||
|
||||
if (ModifierKeys == Keys.Control)
|
||||
{
|
||||
@ -233,12 +232,12 @@ namespace GrasscutterTools.Forms
|
||||
{
|
||||
if (string.IsNullOrEmpty(command))
|
||||
command = CmbCommand.Text;
|
||||
if (!string.IsNullOrEmpty(command))
|
||||
{
|
||||
if (string.IsNullOrEmpty(command))
|
||||
return;
|
||||
if (CmbCommand.Items.Count > 19)
|
||||
CmbCommand.Items.RemoveAt(0);
|
||||
CmbCommand.Items.Add(command);
|
||||
}
|
||||
CmbCommand.SelectedIndex = CmbCommand.Items.Count - 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user