diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-09-19 20:12:07 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-09-19 20:12:07 +1000 |
commit | edd2c13b6f9ae61f9e14ea2ee41a1952a5c7dac5 (patch) | |
tree | aa0ed3bf1586b887be27ef172b35ab197b830ab0 | |
parent | 7a14ee099c2fd382c2951627bf43e3fc507181f4 (diff) |
Fixed bug where data lost upon save file failure when quit/new/open selected
-rw-r--r-- | src/adapad.adb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/adapad.adb b/src/adapad.adb index 20d5ba4..f7561dc 100644 --- a/src/adapad.adb +++ b/src/adapad.adb @@ -94,7 +94,9 @@ function AdaPad return Integer is begin case Cancel_Save_Discard is when First => return; - when Second => Save_CB.Call (Item); + when Second => + Save_CB.Call (Item); + if Changed then return; end if; when Third => null; end case; Filename := To_Unbounded_String (0); @@ -116,7 +118,9 @@ function AdaPad return Integer is begin case Cancel_Save_Discard is when First => return; - when Second => Save_CB.Call (Item); + when Second => + Save_CB.Call (Item); + if Changed then return; end if; when Third => null; end case; declare @@ -140,7 +144,9 @@ function AdaPad return Integer is begin case Cancel_Save_Discard is when First => return; - when Second => Save_CB.Call (Item); + when Second => + Save_CB.Call (Item); + if Changed then return; end if; when Third => null; end case; This.Editor.Hide; |