]> git.tdb.fi Git - r2c2.git/commitdiff
Use any snap nodes without links as boundaries
authorMikko Rasa <tdb@tdb.fi>
Tue, 19 Nov 2013 13:56:04 +0000 (15:56 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 19 Nov 2013 13:56:04 +0000 (15:56 +0200)
This makes signals snap to tracks again.

source/designer/movetool.cpp

index fa78ba73c3a38e14b11e15ae59772dce62e83d4b..72bbc19ec3e8de206ccb64e3ce196e31709d7048 100644 (file)
@@ -13,9 +13,13 @@ MoveTool::MoveTool(Designer &d, Input::Keyboard &k, Input::Mouse &m, const set<O
        for(ObjectArray::iterator i=objects.begin(); i!=objects.end(); ++i)
        {
                unsigned nls = i->object->get_n_link_slots();
-               for(unsigned j=0; j<nls; ++j)
+               unsigned nsn = i->object->get_n_snap_nodes();
+               unsigned j;
+               for(j=0; j<nls; ++j)
                        if(!o.count(i->object->get_link(j)))
                                boundaries.push_back(Boundary(&*i, j));
+               for(; j<nsn; ++j)
+                       boundaries.push_back(Boundary(&*i, j));
        }
 
        snap_targets = designer.get_layout().get_all<Object>();