| 1088 | } |
| 1089 | |
| 1090 | void Viewport::onDsoMouseRelease(QMouseEvent *event) |
| 1091 | { |
| 1092 | switch (_action_type) |
| 1093 | { |
| 1094 | case NO_ACTION: |
| 1095 | { |
| 1096 | if (event->button() == Qt::LeftButton && _hover_hit) |
| 1097 | { |
| 1098 | set_action(DSO_YM); |
| 1099 | _dso_ym_valid = true; |
| 1100 | _dso_ym_sig_index = _hover_sig_index; |
| 1101 | _dso_ym_sig_value = _hover_sig_value; |
| 1102 | _dso_ym_index = _hover_index; |
| 1103 | _dso_ym_start = event->pos().y(); |
| 1104 | } |
| 1105 | break; |
| 1106 | } |
| 1107 | case DSO_YM: |
| 1108 | { |
| 1109 | if (event->button() == Qt::LeftButton) { |
| 1110 | _dso_ym_end = event->pos().y(); |
| 1111 | set_action(NO_ACTION); |
| 1112 | } |
| 1113 | else if (event->button() == Qt::RightButton) { |
| 1114 | set_action(NO_ACTION); |
| 1115 | _dso_ym_valid = false; |
| 1116 | } |
| 1117 | break; |
| 1118 | } |
| 1119 | case DSO_TRIG_MOVE: |
| 1120 | { |
| 1121 | if (_dso_trig_moved && event->button() == Qt::LeftButton) { |
| 1122 | _drag_sig = NULL; |
| 1123 | set_action(NO_ACTION); |
| 1124 | _dso_trig_moved = false; |
| 1125 | |
| 1126 | std::vector<Trace*> traces; |
| 1127 | _view.get_traces(ALL_VIEW, traces); |
| 1128 | |
| 1129 | for(auto t : traces){ |
| 1130 | t->select(false); |
| 1131 | } |
| 1132 | } |
| 1133 | break; |
| 1134 | } |
| 1135 | case DSO_XM_STEP0: |
| 1136 | { |
| 1137 | if (event->button() == Qt::LeftButton) { |
| 1138 | set_action(DSO_XM_STEP1); |
| 1139 | _dso_xm_valid = true; |
| 1140 | } |
| 1141 | break; |
| 1142 | } |
| 1143 | case DSO_XM_STEP1: |
| 1144 | { |
| 1145 | if (event->button() == Qt::LeftButton) { |
| 1146 | _dso_xm_index[1] = _view.pixel2index(event->pos().x()); |
| 1147 | const uint64_t max_index = max(_dso_xm_index[0], _dso_xm_index[1]); |
nothing calls this directly
no test coverage detected