Revert "apply to 2.3.2"
authormirabilos <tg@debian.org>
Sun, 31 Jan 2021 18:48:38 +0000 (19:48 +0100)
committermirabilos <mirabilos@evolvis.org>
Sun, 31 Jan 2021 18:48:38 +0000 (19:48 +0100)
This reverts commit cf755993cc354bd7339af079712c05033aafdd5f.

debian/patches/upstream/5507.patch

index 9f27831..da9cfa2 100644 (file)
@@ -5,33 +5,27 @@ Description: fix #292648: make courtesy accidentals stay if notes are
 
 --- a/libmscore/cmd.cpp
 +++ b/libmscore/cmd.cpp
-@@ -1354,16 +1354,21 @@ void Score::upDown(bool up, UpDownMode m
+@@ -1564,12 +1564,17 @@ void Score::upDown(bool up, UpDownMode mode)
  
              if ((oNote->pitch() != newPitch) || (oNote->tpc1() != newTpc1) || oNote->tpc2() != newTpc2) {
                    // remove accidental if present to make sure
 -                  // user added accidentals are removed here.
--                  if (oNote->links()) {
--                        for (ScoreElement* e : *oNote->links()) {
--                              Note* ln = static_cast<Note*>(e);
--                              if (ln->accidental())
--                                    undoRemoveElement(ln->accidental());
+-                  auto l = oNote->linkList();
+-                  for (ScoreElement* e : l) {
+-                        Note* ln = toNote(e);
+-                        if (ln->accidental())
+-                              undo(new RemoveElement(ln->accidental()));
 +                  // user added accidentals are removed here
 +                  // unless it's an octave change
 +                  // in this case courtesy accidentals are preserved
 +                  // because they're now harder to be re-entered due to the revised note-input workflow
 +                  if (mode != UpDownMode::OCTAVE) {
-+                        if (oNote->links()) {
-+                              for (ScoreElement* e : *oNote->links()) {
-+                                    Note* ln = static_cast<Note*>(e);
-+                                    if (ln->accidental())
-+                                          undoRemoveElement(ln->accidental());
-+                                    }
-                               }
-+                        else if (oNote->accidental())
-+                              undoRemoveElement(oNote->accidental());
++                        auto l = oNote->linkList();
++                        for (ScoreElement* e : l) {
++                              Note* ln = toNote(e);
++                              if (ln->accidental())
++                                    undo(new RemoveElement(ln->accidental()));
++                              }
                          }
--                  else if (oNote->accidental())
--                        undoRemoveElement(oNote->accidental());
                    undoChangePitch(oNote, newPitch, newTpc1, newTpc2);
                    }