From f68e3138f47797dc39290eed37e5ba5aab9a3af6 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 11 May 2018 10:47:31 -0500 Subject: [PATCH] Track if the action collection needs to be saved. --- EduNetworkBuilder/ActionClass.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/EduNetworkBuilder/ActionClass.cs b/EduNetworkBuilder/ActionClass.cs index 71a1595..d67123b 100644 --- a/EduNetworkBuilder/ActionClass.cs +++ b/EduNetworkBuilder/ActionClass.cs @@ -12,6 +12,11 @@ namespace EduNetworkBuilder Network StartingState = null; public List NetActions = new List(); NetworkAction CurrentNetAction = null; + bool _HasUnsavedChanges = false; + public bool HasUnsavedChanges { + get { return _HasUnsavedChanges; } + private set { _HasUnsavedChanges = value; } + } public Network GetNet { get { return StartingState; } } public int GetActionCount { get { if (CurrentNetAction == null) return 0; return CurrentNetAction.Actions.Count; } } @@ -68,6 +73,8 @@ namespace EduNetworkBuilder //Add this one CurrentNetAction.HasBeenStored = true; //Note that we have stored it NetActions.Add(CurrentNetAction); + //Note that the long-term action list has some new actions which have not been saved + HasUnsavedChanges = true; } ///