fix: random not able to exit piano roll hybrid mode issue when switching between different MIDI regions (introduced a region dragging start threshold)
This commit is contained in:
@@ -492,6 +492,13 @@ const TrackGridItem: React.FC<TrackGridItemProps> = ({
|
||||
currentDragTop.current = null;
|
||||
currentDragRegion.current = null;
|
||||
|
||||
if (finalBarNumber === region.barNumber && finalTrackIndex === region.trackIndex) {
|
||||
if (DEBUG_MODE.TRACK_GRID_ITEM) {
|
||||
console.log(`Skipping no-op drag update for region ${regionId}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Notify parent about drag end with final values
|
||||
if (onRegionDragEnd) {
|
||||
onRegionDragEnd(regionId, finalBarNumber, finalTrackIndex);
|
||||
@@ -589,4 +596,4 @@ const TrackGridItem: React.FC<TrackGridItemProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default TrackGridItem;
|
||||
export default TrackGridItem;
|
||||
|
||||
Reference in New Issue
Block a user