From c7240f58498fd528157c912ab2015a95b82e6ce6 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 15 Oct 2019 20:22:53 +0300 Subject: [PATCH] Fixed bug when the file save window did not close --- Crypto Notepad/MainForm.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 3826d8b..03dd1b5 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -1,4 +1,4 @@ -using Crypto_Notepad.Properties; +using Crypto_Notepad.Properties; using System; using System.ComponentModel; using System.Diagnostics; @@ -1026,6 +1026,11 @@ private void SaveAsMainMenu_Click(object sender, EventArgs e) if (string.IsNullOrEmpty(PublicVar.encryptionKey.Get())) { enterKeyForm.ShowDialog(); + if (!PublicVar.okPressed) + { + PublicVar.openFileName = Path.GetFileName(filePath); + return; + } } if (saveFileDialog.ShowDialog() != DialogResult.OK) {