fix: reset mute/solo UI states on project/track changes
This commit is contained in:
@@ -84,6 +84,13 @@ const TrackInfoItem: React.FC<TrackInfoItemProps> = ({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setVolume(track.getVolume());
|
setVolume(track.getVolume());
|
||||||
}, [allTracks, track]);
|
}, [allTracks, track]);
|
||||||
|
|
||||||
|
// Sync mute/solo UI with audio interface state on track/project changes
|
||||||
|
useEffect(() => {
|
||||||
|
setMuted(false);
|
||||||
|
setSolo(false);
|
||||||
|
}, [allTracks, track]);
|
||||||
|
|
||||||
// Handle track name edit within the component
|
// Handle track name edit within the component
|
||||||
const handleTrackNameClick = (e: React.MouseEvent) => {
|
const handleTrackNameClick = (e: React.MouseEvent) => {
|
||||||
e.stopPropagation(); // Prevent opening piano roll when clicking track name
|
e.stopPropagation(); // Prevent opening piano roll when clicking track name
|
||||||
|
|||||||
Reference in New Issue
Block a user