-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Issue #22767: Implement Unmute-all and Unsolo-all buttons to mixer #33798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -69,6 +69,8 @@ static const ActionCode REPEAT_CODE("repeat"); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const ActionCode PLAY_CHORD_SYMBOLS_CODE("play-chord-symbols"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const ActionCode PLAYBACK_SETUP("playback-setup"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const ActionCode TOGGLE_HEAR_PLAYBACK_WHEN_EDITING_CODE("toggle-hear-playback-when-editing"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const ActionCode UNMUTE_ALL_CODE("unmute-all"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static const ActionCode UNSOLO_ALL_CODE("unsolo-all"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static AudioOutputParams makeReverbOutputParams() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -127,6 +129,8 @@ void PlaybackController::init() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dispatcher()->reg(this, PLAYBACK_SETUP, this, &PlaybackController::openPlaybackSetupDialog); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dispatcher()->reg(this, TOGGLE_HEAR_PLAYBACK_WHEN_EDITING_CODE, this, &PlaybackController::toggleHearPlaybackWhenEditing); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dispatcher()->reg(this, "playback-reload-cache", this, &PlaybackController::reloadPlaybackCache); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dispatcher()->reg(this, UNMUTE_ALL_CODE, this, &PlaybackController::unmuteAll); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dispatcher()->reg(this, UNSOLO_ALL_CODE, this, &PlaybackController::unsoloAll); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m_onlineSoundsController->regActions(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -956,6 +960,41 @@ void PlaybackController::reloadPlaybackCache() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void PlaybackController::unmuteAll() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InstrumentTrackIdSet existingTrackIdSet = notationPlayback()->existingTrackIdSet(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (const InstrumentTrackId& instrumentTrackId : existingTrackIdSet) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (instrumentTrackId == notationPlayback()->metronomeTrackId()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| INotationSoloMuteState::SoloMuteState newState = m_notation->soloMuteState()->trackSoloMuteState(instrumentTrackId); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (newState.mute == true) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| newState.mute = false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setTrackSoloMuteState(instrumentTrackId, newState); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updateSoloMuteStates(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+963
to
+981
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win Code style issues in Several style inconsistencies:
♻️ Proposed fix for style issues- INotationSoloMuteState::SoloMuteState new_state = m_notation->soloMuteState()->trackSoloMuteState(instrumentTrackId);
- if(new_state.mute == true) {
+ INotationSoloMuteState::SoloMuteState newState = m_notation->soloMuteState()->trackSoloMuteState(instrumentTrackId);
+ if (newState.mute) {
- new_state.mute = false;
+ newState.mute = false;
- setTrackSoloMuteState(instrumentTrackId,new_state);
+ setTrackSoloMuteState(instrumentTrackId, newState);
}🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void PlaybackController::unsoloAll() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InstrumentTrackIdSet existingTrackIdSet = notationPlayback()->existingTrackIdSet(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (const InstrumentTrackId& instrumentTrackId : existingTrackIdSet) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| INotationSoloMuteState::SoloMuteState newState = trackSoloMuteState(instrumentTrackId); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (newState.solo == true) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| newState.solo = false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setTrackSoloMuteState(instrumentTrackId, newState); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updateSoloMuteStates(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+963
to
+996
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing null safety checks in Both methods call 🛡️ Proposed fix to add guards void PlaybackController::unmuteAll()
{
+ IF_ASSERT_FAILED(notationPlayback() && m_notation) {
+ return;
+ }
+
InstrumentTrackIdSet existingTrackIdSet = notationPlayback()->existingTrackIdSet();
...
}
void PlaybackController::unsoloAll()
{
+ IF_ASSERT_FAILED(notationPlayback()) {
+ return;
+ }
+
InstrumentTrackIdSet existingTrackIdSet = notationPlayback()->existingTrackIdSet();
...
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Comment on lines
+983
to
+996
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent metronome handling between
Additionally, the same code-style issues apply here: snake_case naming, redundant bool comparison, missing space after ♻️ Proposed fix for consistency and styleAdd metronome skip for symmetry and apply style fixes: void PlaybackController::unsoloAll()
{
InstrumentTrackIdSet existingTrackIdSet = notationPlayback()->existingTrackIdSet();
for (const InstrumentTrackId& instrumentTrackId : existingTrackIdSet) {
-
- INotationSoloMuteState::SoloMuteState new_state = trackSoloMuteState(instrumentTrackId);
- if(new_state.solo == true) {
- new_state.solo = false;
- setTrackSoloMuteState(instrumentTrackId,new_state);
+ if (instrumentTrackId == notationPlayback()->metronomeTrackId()) {
+ continue;
+ }
+
+ INotationSoloMuteState::SoloMuteState newState = trackSoloMuteState(instrumentTrackId);
+ if (newState.solo) {
+ newState.solo = false;
+ setTrackSoloMuteState(instrumentTrackId, newState);
}
}🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void PlaybackController::openPlaybackSetupDialog() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| interactive()->open("musescore://playback/soundprofilesdialog"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -305,21 +305,34 @@ ColumnLayout { | |||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| MixerMuteAndSoloSection { | ||||||||||||||||||||||||||||||||||||||||||||||
| id: muteAndSoloSection | ||||||||||||||||||||||||||||||||||||||||||||||
| Item { | ||||||||||||||||||||||||||||||||||||||||||||||
| width: contentColumn.width | ||||||||||||||||||||||||||||||||||||||||||||||
| height: muteAndSoloSection.height | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| visible: contextMenuModel.muteAndSoloSectionVisible | ||||||||||||||||||||||||||||||||||||||||||||||
| headerVisible: contextMenuModel.labelsSectionVisible | ||||||||||||||||||||||||||||||||||||||||||||||
| headerWidth: prv.headerWidth | ||||||||||||||||||||||||||||||||||||||||||||||
| channelItemWidth: prv.channelItemWidth | ||||||||||||||||||||||||||||||||||||||||||||||
| MixerMuteAndSoloSection { | ||||||||||||||||||||||||||||||||||||||||||||||
| id: muteAndSoloSection | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| model: mixerPanelModel | ||||||||||||||||||||||||||||||||||||||||||||||
| visible: contextMenuModel.muteAndSoloSectionVisible | ||||||||||||||||||||||||||||||||||||||||||||||
| headerVisible: contextMenuModel.labelsSectionVisible | ||||||||||||||||||||||||||||||||||||||||||||||
| headerWidth: prv.headerWidth | ||||||||||||||||||||||||||||||||||||||||||||||
| channelItemWidth: prv.channelItemWidth | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| navigationRowStart: 600 | ||||||||||||||||||||||||||||||||||||||||||||||
| needReadChannelName: prv.isPanelActivated | ||||||||||||||||||||||||||||||||||||||||||||||
| model: mixerPanelModel | ||||||||||||||||||||||||||||||||||||||||||||||
| navigationRowStart: 600 | ||||||||||||||||||||||||||||||||||||||||||||||
| needReadChannelName: prv.isPanelActivated | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| onNavigateControlIndexChanged: function(index) { | ||||||||||||||||||||||||||||||||||||||||||||||
| prv.setNavigateControlIndex(index) | ||||||||||||||||||||||||||||||||||||||||||||||
| onNavigateControlIndexChanged: function(index) { | ||||||||||||||||||||||||||||||||||||||||||||||
| prv.setNavigateControlIndex(index) | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| MixerUnMuteAndUnSoloSection { | ||||||||||||||||||||||||||||||||||||||||||||||
| anchors.left: parent.left | ||||||||||||||||||||||||||||||||||||||||||||||
| anchors.verticalCenter: parent.verticalCenter | ||||||||||||||||||||||||||||||||||||||||||||||
| visible: contextMenuModel.unMuteAndUnSoloSectionVisible | ||||||||||||||||||||||||||||||||||||||||||||||
| headerVisible: contextMenuModel.labelsSectionVisible | ||||||||||||||||||||||||||||||||||||||||||||||
| headerWidth: prv.headerWidth | ||||||||||||||||||||||||||||||||||||||||||||||
| model: mixerPanelModel | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+329
to
336
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing required navigation properties causes runtime error and breaks keyboard navigation. The Every other mixer section in this file (sound, fx, auxSends, balance, volume, fader, muteAndSolo, title) sets 🔧 Proposed fix to add missing navigation properties MixerUnMuteAndUnSoloSection {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
visible: contextMenuModel.unMuteAndUnSoloSectionVisible
headerVisible: contextMenuModel.labelsSectionVisible
headerWidth: prv.headerWidth
model: mixerPanelModel
+ navigationRowStart: 650
+ needReadChannelName: prv.isPanelActivated
+
+ onNavigateControlIndexChanged: function(index) {
+ prv.setNavigateControlIndex(index)
+ }
}Note: 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| /* | ||
| * SPDX-License-Identifier: GPL-3.0-only | ||
| * MuseScore-Studio-CLA-applies | ||
| * | ||
| * MuseScore Studio | ||
| * Music Composition & Notation | ||
| * | ||
| * Copyright (C) 2021 MuseScore Limited | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License version 3 as | ||
| * published by the Free Software Foundation. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| pragma ComponentBehavior: Bound | ||
|
|
||
| import QtQuick | ||
|
|
||
| import Muse.Ui | ||
| import Muse.UiComponents | ||
| import MuseScore.Playback | ||
|
|
||
| Item { | ||
| id: root | ||
|
|
||
| property var model: undefined | ||
| property int headerWidth: 98 | ||
| property bool headerVisible: true | ||
| property alias unMuteButton: unMuteAllButton | ||
| property alias unSoloButton: unSoloAllButton | ||
|
|
||
| height: 28 | ||
| width: headerWidth | ||
| visible: headerVisible | ||
|
|
||
| Row { | ||
| anchors.centerIn: parent | ||
| spacing: 6 | ||
|
|
||
| FlatToggleButton { | ||
| id: unMuteAllButton | ||
|
|
||
| height: 20 | ||
| width: 20 | ||
|
|
||
| icon: IconCode.MUTE | ||
|
|
||
| enabled: parent.enabled | ||
| visible: parent.visible | ||
|
|
||
| navigation.name: "UnMuteAllButton" | ||
| navigation.panel: root.channelItem.panel | ||
| navigation.row: root.navigationRowStart | ||
| navigation.accessible.name: root.accessibleName + " " + qsTrc("playback", "Unmute All") | ||
| navigation.onActiveChanged: { | ||
| if (navigation.active) { | ||
| root.navigateControlIndexChanged({row: navigation.row, column: navigation.column}) | ||
| } | ||
| } | ||
|
|
||
| onToggled: { | ||
| for (let i = 0; i < model.rowCount(); i++) { | ||
| let item = model.get(i); | ||
|
|
||
| if(item.channelItem.type === MixerChannelItem.Metronome){ | ||
| continue | ||
| } | ||
|
|
||
| item.channelItem.muted = false | ||
| } | ||
| } | ||
| } | ||
|
|
||
| FlatToggleButton { | ||
| id: unSoloAllButton | ||
|
|
||
| height: 20 | ||
| width: 20 | ||
|
|
||
| icon: IconCode.SOLO | ||
|
|
||
| enabled: parent.enabled | ||
| visible: parent.visible | ||
|
|
||
| navigation.name: "UnSoloAllButton" | ||
| navigation.panel: root.channelItem.panel | ||
| navigation.row: root.navigationRowStart + 1 | ||
| navigation.accessible.name: root.accessibleName + " " + qsTrc("playback", "Unsolo All") | ||
| navigation.onActiveChanged: { | ||
| if (navigation.active) { | ||
| root.navigateControlIndexChanged({row: navigation.row, column: navigation.column}) | ||
| } | ||
| } | ||
|
|
||
| onToggled: { | ||
| for (let i = 0; i < model.rowCount(); i++) { | ||
| let item = model.get(i); | ||
| item.channelItem.solo = false | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -49,6 +49,7 @@ static TranslatableString mixerSectionTitle(MixerSectionType type) | |||||
| case MixerSectionType::Fader: return TranslatableString("playback", "Fader"); | ||||||
| case MixerSectionType::MuteAndSolo: return TranslatableString("playback", "Mute and solo"); | ||||||
| case MixerSectionType::Title: return TranslatableString("playback", "Name"); | ||||||
| case MixerSectionType::UnMuteAndUnSolo: return TranslatableString("playback", "Unmute and Unsolo"); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent capitalization in section title. The title ✏️ Proposed fix- case MixerSectionType::UnMuteAndUnSolo: return TranslatableString("playback", "Unmute and Unsolo");
+ case MixerSectionType::UnMuteAndUnSolo: return TranslatableString("playback", "Unmute and unsolo");📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| case MixerSectionType::Unknown: break; | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -121,6 +122,11 @@ bool MixerPanelContextMenuModel::titleSectionVisible() const | |||||
| return isSectionVisible(MixerSectionType::Title); | ||||||
| } | ||||||
|
|
||||||
| bool MixerPanelContextMenuModel::unMuteAndUnSoloSectionVisible() const | ||||||
| { | ||||||
| return isSectionVisible(MixerSectionType::UnMuteAndUnSolo); | ||||||
| } | ||||||
|
|
||||||
| void MixerPanelContextMenuModel::load() | ||||||
| { | ||||||
| AbstractMenuModel::load(); | ||||||
|
|
@@ -149,6 +155,7 @@ void MixerPanelContextMenuModel::load() | |||||
| buildSectionVisibleItem(MixerSectionType::Labels), | ||||||
| buildSectionVisibleItem(MixerSectionType::Sound), | ||||||
| buildSectionVisibleItem(MixerSectionType::AudioFX), | ||||||
| buildSectionVisibleItem(MixerSectionType::UnMuteAndUnSolo), | ||||||
| }; | ||||||
|
|
||||||
| for (aux_channel_idx_t idx = 0; idx < AUX_CHANNEL_NUM; ++idx) { | ||||||
|
|
@@ -318,6 +325,9 @@ void MixerPanelContextMenuModel::emitMixerSectionVisibilityChanged(MixerSectionT | |||||
| case MixerSectionType::Title: | ||||||
| emit titleSectionVisibleChanged(); | ||||||
| break; | ||||||
| case MixerSectionType::UnMuteAndUnSolo: | ||||||
| emit unMuteAndUnSoloSectionVisibleChanged(); | ||||||
| break; | ||||||
| case MixerSectionType::Unknown: | ||||||
| break; | ||||||
| } | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.