updated the naming convention for new tracks and regions. New tracks now default to 'Track {i}', and new regions default to '{track_name} Region {i}'.

This commit is contained in:
Xiaohan-Tian
2025-08-12 21:41:11 -07:00
parent 47872287ce
commit 2510014580
3 changed files with 58 additions and 2 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import { KGMainContentState } from '../../core/state/KGMainContentState';
import { isModifierKeyPressed } from '../../util/osUtil';
import { CreateRegionCommand, ResizeRegionCommand, MoveRegionCommand } from '../../core/commands';
import { KGCore } from '../../core/KGCore';
import { generateNewRegionName } from '../../util/miscUtil';
interface TrackGridPanelProps {
tracks: KGTrack[];
@@ -97,7 +98,7 @@ const TrackGridPanel: React.FC<TrackGridPanelProps> = ({
barNumber,
1, // Default to 1 bar length
beatsPerBar,
`${track.getName()} Region`
generateNewRegionName(trackId)
);
KGCore.instance().executeCommand(command);