fix: configuration of gpg.ssh.program was cleared on Preference windows closing.

This commit is contained in:
leo 2024-06-21 18:23:32 +08:00
parent c713210a9e
commit 16b6e90656
No known key found for this signature in database

View file

@ -189,7 +189,9 @@ namespace SourceGit.Views
SetIfChanged(config, "commit.gpgsign", EnableGPGCommitSigning ? "true" : "false"); SetIfChanged(config, "commit.gpgsign", EnableGPGCommitSigning ? "true" : "false");
SetIfChanged(config, "tag.gpgsign", EnableGPGTagSigning ? "true" : "false"); SetIfChanged(config, "tag.gpgsign", EnableGPGTagSigning ? "true" : "false");
SetIfChanged(config, "gpg.format", GPGFormat.Value); SetIfChanged(config, "gpg.format", GPGFormat.Value);
SetIfChanged(config, $"gpg.{GPGFormat.Value}.program", GPGFormat.Value != "ssh" ? GPGExecutableFile : null);
if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal))
SetIfChanged(config, $"gpg.{GPGFormat.Value}.program", GPGExecutableFile);
Close(); Close();
} }