| 136 | } |
| 137 | |
| 138 | CFrameClipData CFrameEditorModel::CopySelection(const CFrameSelection &sel) const { |
| 139 | auto [b, e] = CFrameIterator::FromSelection(sel, *view_->GetSongView()); |
| 140 | |
| 141 | CFrameClipData Data {sel.GetSelectedChanCount(), sel.GetSelectedFrameCount()}; |
| 142 | Data.ClipInfo.FirstChannel = b.m_iChannel; // // // |
| 143 | Data.ClipInfo.OleInfo.SourceRowStart = b.m_iFrame; |
| 144 | Data.ClipInfo.OleInfo.SourceRowEnd = e.m_iFrame - 1; |
| 145 | |
| 146 | int f = 0; |
| 147 | for (; b != e; ++f) { |
| 148 | for (int c = b.m_iChannel; c < e.m_iChannel; ++c) |
| 149 | Data.SetFrame(f, c - b.m_iChannel, b.Get(c)); |
| 150 | ++b; |
| 151 | if (b.m_iFrame == 0) |
| 152 | break; |
| 153 | } |
| 154 | |
| 155 | return Data; |
| 156 | } |
| 157 | |
| 158 | void CFrameEditorModel::PasteSelection(const CFrameClipData &clipdata, const CFrameCursorPos &pos) { |
| 159 | CFrameIterator it {*view_->GetSongView(), pos}; |
nothing calls this directly
no test coverage detected