TrackAttachment::TrackAttachment(Layout &l):
Object(l),
offset(0)
-{ }
+{
+ layout.signal_object_removed.connect(sigc::mem_fun(this, &TrackAttachment::object_removed));
+}
TrackAttachment::~TrackAttachment()
{
return offs;
}
+void TrackAttachment::object_removed(Object &o)
+{
+ if(&o==track.track())
+ track = TrackIter();
+}
+
} // namespace R2C"
namespace R2C2 {
-class TrackAttachment: public Object
+class TrackAttachment: public Object, public sigc::trackable
{
protected:
TrackIter track;
public:
virtual Track *get_parent() const { return track.track(); }
+
+private:
+ void object_removed(Object &);
};
} // namespace R2C2