Skip to content

Commit

Permalink
fix #295842: fix a crash on launching MuseScore with -s option
Browse files Browse the repository at this point in the history
Also disable "Show Mixer" action when no synthesizer is available
  • Loading branch information
dmitrio95 authored and anatoly-os committed Oct 19, 2019
1 parent 1828787 commit 0adb25e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mscore/mixer.cpp
Expand Up @@ -482,8 +482,13 @@ void Mixer::notifyTrackSelected(MixerTrack* track)

void MuseScore::showMixer(bool visible)
{

QAction* toggleMixerAction = getAction("toggle-mixer");

if (!synti) {
toggleMixerAction->setChecked(false);
return;
}

if (mixer == 0) {
mixer = new Mixer(this);
mscore->stackUnder(mixer);
Expand Down
2 changes: 1 addition & 1 deletion mscore/musescore.cpp
Expand Up @@ -4219,7 +4219,7 @@ void MuseScore::changeState(ScoreState val)
a->setEnabled(cs && (cs->selection().state() != SelState::NONE || val == STATE_FOTO));
else if (enable && (s->key() == "select-similar-range"))
a->setEnabled(cs && cs->selection().state() == SelState::RANGE);
else if (enable && (s->key() == "synth-control")) {
else if (enable && (s->key() == "synth-control" || s->key() == "toggle-mixer")) {
Driver* driver = seq ? seq->driver() : 0;
// a->setEnabled(driver && driver->getSynth());
if (MScore::debugMode)
Expand Down

0 comments on commit 0adb25e

Please sign in to comment.