fix: reset mute/solo UI states on project/track changes
This commit is contained in:
1 parent
1fd1486c59
commit
62b3a8c8d7
1 file changed
+7
@@ -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