diff -r df3820d7989d -r 5b37a10234bc lemon/bits/alteration_notifier.h --- a/lemon/bits/alteration_notifier.h Wed Sep 14 10:00:43 2005 +0000 +++ b/lemon/bits/alteration_notifier.h Fri Sep 16 09:00:18 2005 +0000 @@ -80,6 +80,12 @@ /// ObserverBase() : registry(0) {} + ObserverBase(const ObserverBase& copy) { + if (copy.attached()) { + copy.getRegistry()->attach(*this); + } + } + virtual ~ObserverBase() {} /// \brief Attaches the observer into an AlterationNotifier. @@ -111,10 +117,9 @@ /// Gives back true when the observer is attached into a registry. bool attached() const { return registry != 0; } - + private: - ObserverBase(const ObserverBase& copy); ObserverBase& operator=(const ObserverBase& copy); protected: