X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FObservable.cxx;h=a70219e52422dc8f71d51feb369fb87977194f8b;hb=3babfd57a9b4b3cffba34415e928239592e7d4a1;hp=c52934c2c3cfa1e1128a9a0f77811b2f69b5fb31;hpb=878ac6ad472bc459f4e364c16890e5026c401944;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/Observable.cxx b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/Observable.cxx index c52934c..a70219e 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/Observable.cxx +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/Observable.cxx @@ -43,42 +43,26 @@ namespace bbtk //========================================================================= Observable::Observable() { - _changed=false; } //========================================================================= + Observable::~Observable() { } - //========================================================================= - - bool Observable::hasChanged() - { - return _changed; - } //========================================================================= - void Observable::notifyObservers(int idObservable,int command) + void Observable::notifyObservers(int idCaller,int command) { - if(_changed) + + int i; + for(i=0;i<_observers.size();i++) { - int i; - for(i=0;i<_observers.size();i++) - { - _observers[i]->update(idObservable,command); - } - _changed=false; + _observers[i]->update(idCaller,command); } } - //========================================================================= - - void Observable::setChanged() - { - _changed=true; - } - //========================================================================= void Observable::addObserver(Observer *observer)