+
+ // Move the signals if we are dragging
+ if(!_drag_sigs.empty()) {
+ const int delta = event->pos().y() - _mouse_down_point.y();
+
+ for(std::list<std::pair<boost::weak_ptr<Signal>,
+ int> >::iterator i = _drag_sigs.begin();
+ i != _drag_sigs.end(); i++) {
+ const boost::shared_ptr<Signal> sig((*i).first);
+ if(sig) {
+ const int y = (*i).second + delta;
+ const int y_snap =
+ ((y + View::SignalSnapGridSize / 2) /
+ View::SignalSnapGridSize) *
+ View::SignalSnapGridSize;
+ sig->set_v_offset(y_snap);
+
+ // Ensure the signal is selected
+ sig->select();
+ }
+
+ }
+
+ signals_moved();
+ }
+