From d573ece233fcc922af7446bb72f2c2b6e3171946 Mon Sep 17 00:00:00 2001 From: Patrice Vignola Date: Thu, 13 Aug 2015 22:19:33 -0400 Subject: [PATCH] - Fixed the observer not subscribing to the observable --- Assets/Scripts/PersonDetailsPanel.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Scripts/PersonDetailsPanel.cs b/Assets/Scripts/PersonDetailsPanel.cs index c4d7d48..59fc5e7 100644 --- a/Assets/Scripts/PersonDetailsPanel.cs +++ b/Assets/Scripts/PersonDetailsPanel.cs @@ -16,6 +16,13 @@ public class PersonDetailsPanel : MonoBehaviour, IObserver public void SetModel(Person model) { + if (_model != null) + { + _model.UnSubscribe(this); + } + + _model.Subscribe(this); + _model = model; UpdateInfo(); }