X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fbeamgate.cpp;h=463a3a967e717c78d64efa81189a05926cc88c9c;hb=db0146da06b7db507a510eed7b53aa59905b38ac;hp=698cb4595ac5fa1091993ad78842b855ee9ca0c6;hpb=a2b6ee3a345cb851c98e52608020ba2838326769;p=r2c2.git diff --git a/source/libr2c2/beamgate.cpp b/source/libr2c2/beamgate.cpp index 698cb45..463a3a9 100644 --- a/source/libr2c2/beamgate.cpp +++ b/source/libr2c2/beamgate.cpp @@ -13,17 +13,17 @@ BeamGate::BeamGate(Layout &l): { invert = true; - layout.add(*this); + TrackAttachment::layout.add(*this); } BeamGate::~BeamGate() { - layout.remove(*this); + TrackAttachment::layout.remove(*this); } BeamGate *BeamGate::clone(Layout *to_layout) const { - BeamGate *gate = new BeamGate(to_layout ? *to_layout : layout); + BeamGate *gate = new BeamGate(to_layout ? *to_layout : TrackAttachment::layout); gate->set_position(position); gate->set_rotation(rotation); return gate; @@ -50,7 +50,7 @@ void BeamGate::set_rotation(const Angle &r) void BeamGate::update_attachment() { - attach_to_closest(100*layout.get_catalogue().get_gauge()); + attach_to_closest(100*TrackAttachment::layout.get_catalogue().get_gauge()); if(track) {