| 233 | } |
| 234 | |
| 235 | void CSampleEditorView::OnLButtonUp(UINT nFlags, CPoint point) |
| 236 | { |
| 237 | // Sets the start cursor |
| 238 | |
| 239 | if (!m_iSize) |
| 240 | return; |
| 241 | |
| 242 | if (!m_bClicked) |
| 243 | return; |
| 244 | |
| 245 | m_bClicked = false; |
| 246 | |
| 247 | double Sample = double(point.x + int(m_iViewStart / m_dSampleStep)) * m_dSampleStep; |
| 248 | int Offset = int(Sample / (8.0 * 64.0)); |
| 249 | |
| 250 | if (m_iSelEnd == m_iSelStart) { |
| 251 | m_iStartCursor = Offset; |
| 252 | m_iSelStart = m_iSelEnd = -1; |
| 253 | DrawStartCursor(); |
| 254 | } |
| 255 | else { |
| 256 | if (m_iSelEnd < m_iSelStart) { |
| 257 | int Temp = m_iSelEnd; |
| 258 | m_iSelEnd = m_iSelStart; |
| 259 | m_iSelStart = Temp; |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | static_cast<CSampleEditorDlg*>(GetParent())->SelectionChanged(); |
| 264 | |
| 265 | CStatic::OnLButtonUp(nFlags, point); |
| 266 | } |
| 267 | |
| 268 | void CSampleEditorView::DrawPlayCursor(int Pos) |
| 269 | { |
nothing calls this directly
no test coverage detected