]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/beamgate.cpp
Get rid of some obsolete #includes
[r2c2.git] / source / libr2c2 / beamgate.cpp
index 698cb4595ac5fa1091993ad78842b855ee9ca0c6..15c2b8e05fea22587ccb0fb114441b2b805d1cc2 100644 (file)
@@ -1,5 +1,4 @@
 #include "beamgate.h"
-#include "catalogue.h"
 #include "layout.h"
 
 using namespace std;
@@ -13,17 +12,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 +49,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);
 
        if(track)
        {