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:
Xiaohan-Tian
2026-05-01 20:34:21 -07:00
parent cbd2fc60a0
commit d5795c5281
6 changed files with 234 additions and 36 deletions
+8 -1
View File
@@ -386,6 +386,13 @@ const TrackGridPanel: React.FC<TrackGridPanelProps> = ({
// Find the region
const region = regions.find(r => r.id === regionId);
if (!region) return;
if (finalBarNumber === region.barNumber && finalTrackIndex === region.trackIndex) {
if (DEBUG_MODE.TRACK_GRID_PANEL) {
console.log(`Skipping no-op move for region ${regionId}`);
}
return;
}
// Get the target track
const targetTrack = tracks[finalTrackIndex];
@@ -680,4 +687,4 @@ const TrackGridPanel: React.FC<TrackGridPanelProps> = ({
);
};
export default TrackGridPanel;
export default TrackGridPanel;