TCO drag: Fix Ctrl+Drag crash
Fix some assumptions that source and target of a drag actions are the same track container. Instead of looking up necessary information (track name, type and container id) by track index, add it to the metadata. Refactor canPasteSelection to take QDropEvent instead of the drop event's QMimeData. Coincidentally, this fixes the method to be consistent with its documentation. Fixes #4844
This commit is contained in:
@@ -341,7 +341,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData );
|
||||
bool canPasteSelection( MidiTime tcoPos, const QDropEvent *de );
|
||||
bool pasteSelection( MidiTime tcoPos, QDropEvent * de );
|
||||
|
||||
MidiTime endPosition( const MidiTime & posStart );
|
||||
|
||||
Reference in New Issue
Block a user