MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnLButtonUp

Method OnLButtonUp

Source/InstrumentListCtrl.cpp:285–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void CInstrumentListCtrl::OnLButtonUp(UINT nFlags, CPoint point)
286{
287 // End a drag operation
288 if (m_bDragging) {
289 ReleaseCapture();
290 m_bDragging = false;
291
292 CImageList::DragLeave(this);
293 CImageList::EndDrag();
294 m_pDragImage.reset(); // // //
295
296 // Remove highlight
297 SetItemState(-1, 0, LVIS_DROPHILITED);
298 RedrawItems(-1, -1);
299 UpdateWindow();
300
301 if (m_nDropIndex != -1 && m_nDragIndex != m_nDropIndex) {
302 // Perform operation
303 int First = GetInstrumentIndex(m_nDragIndex);
304 int Second = GetInstrumentIndex(m_nDropIndex);
305 m_pMainFrame->SwapInstruments(First, Second);
306 }
307 }
308
309 CListCtrl::OnLButtonUp(nFlags, point);
310}

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
SwapInstrumentsMethod · 0.45

Tested by

no test coverage detected