- const shared_ptr<Signal> mouse_over_signal =
- get_mouse_over_signal(event->pos());
- if(mouse_over_signal)
- mouse_over_signal->select(!mouse_over_signal->selected());
-
- if(event->button() & Qt::LeftButton) {
- _mouse_down_point = event->pos();
+ const shared_ptr<Trace> mouse_over_trace =
+ get_mouse_over_trace(event->pos());
+ if (mouse_over_trace) {
+ if (mouse_over_trace->selected())
+ mouse_over_trace->select(false);
+ else {
+ mouse_over_trace->select(true);
+
+ if (~QApplication::keyboardModifiers() &
+ Qt::ControlModifier)
+ _drag_traces.clear();
+
+ // Add the signal to the drag list
+ if (event->button() & Qt::LeftButton)
+ _drag_traces.push_back(
+ make_pair(mouse_over_trace,
+ mouse_over_trace->get_v_offset()));
+ }
+ }