- Fixed the observer not subscribing to the observable

This commit is contained in:
Patrice Vignola 2015-08-13 22:19:33 -04:00
parent 91739e47a0
commit d573ece233

View File

@ -16,6 +16,13 @@ public class PersonDetailsPanel : MonoBehaviour, IObserver
public void SetModel(Person model) public void SetModel(Person model)
{ {
if (_model != null)
{
_model.UnSubscribe(this);
}
_model.Subscribe(this);
_model = model; _model = model;
UpdateInfo(); UpdateInfo();
} }