- // Move the signals if we are dragging
- if (!_drag_traces.empty())
- {
- _dragging = true;
-
- const int delta = event->pos().y() - _mouse_down_point.y();
-
- for (std::list<std::pair<boost::weak_ptr<Trace>,
- int> >::iterator i = _drag_traces.begin();
- i != _drag_traces.end(); i++) {
- const boost::shared_ptr<Trace> trace((*i).first);
- if (trace) {
- const int y = (*i).second + delta;
- const int y_snap =
- ((y + View::SignalSnapGridSize / 2) /
- View::SignalSnapGridSize) *
- View::SignalSnapGridSize;
- trace->set_v_offset(y_snap);
-
- // Ensure the trace is selected
- trace->select();
- }
-
+ // Check all the drag items share a common owner
+ RowItemOwner *item_owner = nullptr;
+ for (shared_ptr<RowItem> r : _view)
+ if (r->dragging()) {
+ if (!item_owner)
+ item_owner = r->owner();
+ else if(item_owner != r->owner())
+ return;