]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/Observable.cxx
Now the contour is created from the center of the initial port
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / Observable.cxx
index 819f3410c324a1a36020a0f0236385944bc46978..cf21b32e9990b87f06c58d19d23c45c006d67203 100644 (file)
@@ -59,14 +59,17 @@ namespace bbtk
 
        //=========================================================================
        
-       void Observable::notifyObservers()
+       void Observable::notifyObservers(int idController,int command)
        {
-               int i;
-               for(i=0;i<_observers.size();i++)
+               if(_changed)
                {
-                       _observers[i]->update();
-               }               
-               _changed=false;
+                       int i;
+                       for(i=0;i<_observers.size();i++)
+                       {
+                               _observers[i]->update(idController,command);
+                       }
+                       _changed=false;
+               }
        }
 
     //=========================================================================                
@@ -78,6 +81,11 @@ namespace bbtk
 
        //=========================================================================
 
+       void Observable::addObserver(Observer *observer)
+       {
+               _observers.push_back(observer);
+       }
+
 }  // EO namespace bbtk
 
 // EOF