Brett-Tech-Networking/Moradi-Notepad

Disable Save Prompt When No Changes Are Made

MattMoradi opened this issue · 5 comments

When a user attempts to create a new document by clicking the "New" (Ctrl+N) or "Open" (Ctrl+O) button, they are prompted to save their changes, even if changes have not been made. This should be disabled under the circumstances of text being non-existent (blank) in the text field of the notepad. This prompt should only appear if and only if their is text in the notepad to be saved.
save_issue

We'll try and resolve this issue after I've released my next patch. :D

Alright

wonder why a user would click new if there's nothing in the doc lol

We should also disable the prompt on exit when the user has already saved the document using either "Save" or "Save-As" && the user hasn't made any changes since the last save.

I have corrected this by using if (richTextBox1.Modified == false/true)