]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/slopetool.cpp
Filter out non-viable routing steps before adding them to the list
[r2c2.git] / source / designer / slopetool.cpp
index 869724e68da578e2a7552f6f56fb81ddd13a0744..58a50e1507cf7efad982cf0b0aaaedb08929fe8f 100644 (file)
@@ -5,15 +5,15 @@ using namespace std;
 using namespace Msp;
 using namespace R2C2;
 
-SlopeTool::SlopeTool(Designer &d, Input::Mouse &m, const set<Object *> &objects):
-       Tool(d, m),
+SlopeTool::SlopeTool(Designer &d, Input::Keyboard &k, Input::Mouse &m, const set<Object *> &objects):
+       Tool(d, k, m),
        total_length(0)
 {
        for(set<Object *>::const_iterator i=objects.begin(); i!=objects.end(); ++i)
                if(!dynamic_cast<Track *>(*i) || (*i)->get_n_link_slots()!=2)
                {
                        set_status("Must have linear tracks only");
-                       set_done();
+                       set_done(false);
                        return;
                }