| 2166 | } |
| 2167 | |
| 2168 | void CPatternEditor::MoveToChannel(int Channel) |
| 2169 | { |
| 2170 | const int ChannelCount = GetChannelCount(); |
| 2171 | |
| 2172 | if (Channel == GetChannel()) |
| 2173 | return; |
| 2174 | |
| 2175 | if (Channel < 0) { |
| 2176 | if (FTEnv.GetSettings()->General.bWrapCursor) |
| 2177 | Channel = ChannelCount - 1; |
| 2178 | else |
| 2179 | Channel = 0; |
| 2180 | } |
| 2181 | else if (Channel > ChannelCount - 1) { |
| 2182 | if (FTEnv.GetSettings()->General.bWrapCursor) |
| 2183 | Channel = 0; |
| 2184 | else |
| 2185 | Channel = ChannelCount - 1; |
| 2186 | } |
| 2187 | m_cpCursorPos.Xpos.Track = Channel; |
| 2188 | m_cpCursorPos.Xpos.Column = cursor_column_t::NOTE; |
| 2189 | } |
| 2190 | |
| 2191 | void CPatternEditor::MoveToColumn(cursor_column_t Column) |
| 2192 | { |
no test coverage detected