| 1492 | // // // TODO: move these to CMainFrame? |
| 1493 | |
| 1494 | void CFamiTrackerView::OnBookmarksToggle() |
| 1495 | { |
| 1496 | if ((FTEnv.GetSoundGenerator()->IsPlaying() && m_bFollowMode) || !m_bEditEnable) |
| 1497 | return; |
| 1498 | |
| 1499 | const int Frame = GetSelectedFrame(); |
| 1500 | const int Row = GetSelectedRow(); |
| 1501 | |
| 1502 | CBookmarkCollection &Col = static_cast<CMainFrame *>(GetParentFrame())->GetCurrentSong()->GetBookmarks(); |
| 1503 | if (Col.FindAt(Frame, Row) != nullptr) |
| 1504 | Col.RemoveAt(Frame, Row); |
| 1505 | else { |
| 1506 | auto pMark = std::make_unique<CBookmark>(Frame, Row); |
| 1507 | pMark->m_Highlight.First = pMark->m_Highlight.Second = -1; |
| 1508 | pMark->m_bPersist = false; |
| 1509 | pMark->m_sName = "Bookmark " + std::to_string(Col.GetCount() + 1); |
| 1510 | Col.AddBookmark(std::move(pMark)); |
| 1511 | } |
| 1512 | |
| 1513 | static_cast<CMainFrame*>(GetParentFrame())->UpdateBookmarkList(); |
| 1514 | SetFocus(); |
| 1515 | GetDocument()->ModifyIrreversible(); |
| 1516 | m_pPatternEditor->InvalidatePatternData(); |
| 1517 | RedrawPatternEditor(); |
| 1518 | GetFrameEditor()->InvalidateFrameData(); |
| 1519 | RedrawFrameEditor(); |
| 1520 | } |
| 1521 | |
| 1522 | void CFamiTrackerView::OnBookmarksNext() |
| 1523 | { |
nothing calls this directly
no test coverage detected