From 47ac9d52add6ec2d8be46afe820e81563428aedc Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Mon, 16 Dec 2019 07:58:43 -0500 Subject: [PATCH] some editors want to be notified when they are saved (e.g. for undo/redo stuff) --- CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs index ad33f251..d9bbc0af 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -884,6 +884,9 @@ namespace UniversalEditor.UserInterface Pages.EditorPage currentEditorPage = GetCurrentEditorPage(); if (currentEditorPage != null) { + if (!GetCurrentEditor().NotifySaving()) + return; + SaveFile(currentEditorPage.Document); } }