LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.11k stars 1.01k forks source link

Dragging and dropping tracks from the "Beat+Bassline Editor" to the "Song-Editor" bug. #3599

Closed Sawuare closed 6 years ago

Sawuare commented 7 years ago

When you move a track from the "BB E" to the "Song-Eidtor" by pressing and clicking on "move-grip" then dragging and dropping a note will be added to the moved track. This is the original track that I moved (it contains no notes or active steps): bug 3 This is the "Song-Editor" view of the track I moved: bug 3 This is the "Piano-roll" view of the track I moved: bug 3 You can see that there is a note added.

zonkmachine commented 7 years ago

Confirmed. 1 - This behaviour is in stable-1.1.3 2 - You need to first add steps to an empty track to get a beat note appearing in the new drag copied track (the example above is also a track with added steps).

For some fun.

Edit: Example added

PhysSong commented 7 years ago

Notes are created when you click the copied pattern. https://github.com/LMMS/lmms/blob/9d560a310473f03d4de4a49e86d805952d982171/src/tracks/Pattern.cpp#L764 This code is done if and only if the type of the pattern is Pattern::BeatPattern. Since the type isn't changed after dropping, notes are added. https://github.com/LMMS/lmms/blob/9d560a310473f03d4de4a49e86d805952d982171/src/tracks/Pattern.cpp#L736

Edit: this also looks relevant: https://github.com/LMMS/lmms/blob/9d560a310473f03d4de4a49e86d805952d982171/src/tracks/Pattern.cpp#L359-L372

PhysSong commented 7 years ago

https://github.com/LMMS/lmms/blob/9d560a310473f03d4de4a49e86d805952d982171/src/tracks/Pattern.cpp#L738 This seems more relevant. When you zoom in more than 800% in the song editor, empty patterns will look like BB patterns. It's a feature, but it seems working in an undesirable way in this situation. Some UI event handlers treat a pattern as a BB pattern if it is empty and the length of this not equals to one bar. So I think the condition should be fixed.