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
+4 -3
View File
@@ -439,8 +439,9 @@ const MainContent: React.FC<MainContentProps> = ({
}
}
// If piano roll is visible, set this region as the active region
if (showPianoRoll) {
// Keep the active piano roll region in sync when that same region is updated.
// Do not switch the editor to an unrelated region from generic move/resize updates.
if (showPianoRoll && activeRegionId === regionId) {
setActiveRegionId(regionId);
if (DEBUG_MODE.MAIN_CONTENT) {
@@ -908,4 +909,4 @@ const MainContent: React.FC<MainContentProps> = ({
);
};
export default MainContent;
export default MainContent;