From 81a8982a4237a284489d89a9c0f2fea63a80860b Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 2 Nov 2014 01:58:21 +0100 Subject: [PATCH] fix project modification not checked when opening from menu MRU --- src/ce_main.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ce_main.pas b/src/ce_main.pas index a3652665..c603922a 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -1576,6 +1576,9 @@ end; procedure TCEMainForm.mruProjItemClick(Sender: TObject); begin + if fProject <> nil then if fProject.modified then if dlgOkCancel( + 'The latest mdofifications are not saved, continue ?') + = mrCancel then exit; openProj(TMenuItem(Sender).Hint); end; @@ -1584,7 +1587,6 @@ begin if fProject <> nil then if fProject.modified then if dlgOkCancel( 'The latest mdofifications are not saved, continue ?') = mrCancel then exit; - closeProj; newProj; end; @@ -1626,7 +1628,6 @@ begin if fProject <> nil then if fProject.modified then if dlgOkCancel( 'The latest mdofifications are not saved, continue ?') = mrCancel then exit; - with TOpenDialog.Create(nil) do try if execute then openProj(filename);