- // Select the signal if it has been clicked
- 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()));
- }
+ // Set the signal selection state if the item has been clicked
+ if (_mouse_down_item) {
+ if (ctrl_pressed)
+ _mouse_down_item->select(!_mouse_down_item->selected());
+ else
+ _mouse_down_item->select(true);