File: c7c294cb7166f5e1ab0da445e9493d14ac01c9b6.diff

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-21
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 219,852 kB
  • sloc: cpp: 291,412; xml: 200,226; sh: 3,779; ansic: 1,447; python: 393; makefile: 246; perl: 82; pascal: 79
file content (28 lines) | stat: -rw-r--r-- 1,319 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Forwarded: part of Origin PR by Jojo-Schmitz
Origin: https://github.com/musescore/MuseScore/pull/9000
Author: Joachim Schmitz <jojo@schmitz-digital.de>
Description: Fix #324232: after a MIDI export without expanding repeats, those are not played in the current session anymore either

--- a/libmscore/rendermidi.cpp
+++ b/libmscore/rendermidi.cpp
@@ -2506,8 +2506,10 @@ void Score::renderMidi(EventMap* events,
 
 void Score::renderMidi(EventMap* events, bool metronome, bool expandRepeats, const SynthesizerState& synthState)
       {
+      bool expandRepeatsBackup = masterScore()->expandRepeats();
       masterScore()->setExpandRepeats(expandRepeats);
       MidiRenderer(this).renderScore(events, synthState, metronome);
+      masterScore()->setExpandRepeats(expandRepeatsBackup);
       }
 
 void MidiRenderer::renderScore(EventMap* events, const SynthesizerState& synthState, bool metronome)
--- a/libmscore/score.h
+++ b/libmscore/score.h
@@ -1263,6 +1263,7 @@ class MasterScore : public Score {
       void setPlaylistClean()                                         { _playlistDirty = false; }
 
       void setExpandRepeats(bool expandRepeats);
+      bool expandRepeats() const { return _expandRepeats; }
       void updateRepeatListTempo();
       virtual const RepeatList& repeatList() const override;