~ubuntu-branches/ubuntu/utopic/musescore/utopic

« back to all changes in this revision

Viewing changes to mscore/mscore/note.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Toby Smithe, Matthias Klose
  • Date: 2011-02-16 20:04:20 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110216200420-rlu5xdmcop6skghj
Tags: 1.0+dfsg-2
* Re-include Matthias Klose's armel qreal fixes (Closes: #597802)
  (I missed 0.9.6.3+dfsg-0ubuntu2...
   Apologies to Matthias and my sponsor, Tobias Quathamer!)

* debian/patches/12-debianise-about-box.dpatch:
  + Update "About" dialogue box to give copyright to 2011.

[ Matthias Klose ]
* More armel qreal fixes. LP: #642117.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//=============================================================================
2
2
//  MuseScore
3
3
//  Linux Music Score Editor
4
 
//  $Id: note.cpp 3269 2010-07-09 20:20:39Z lasconic $
 
4
//  $Id: note.cpp 3991 2011-02-03 16:43:35Z lasconic $
5
5
//
6
6
//  Copyright (C) 2002-2009 Werner Schweer and others
7
7
//
557
557
            xml.tag("tuning", _tuning);
558
558
 
559
559
      if (userAccidental())
560
 
            xml.tag("userAccidental", userAccidental());
 
560
            xml.tag("userAccidental", userAccidental() & 0x7fff);
561
561
      if (_accidental &&
562
 
         (!_accidental->userOff().isNull() || !_accidental->visible())
 
562
         (!_accidental->userOff().isNull() || !_accidental->visible()
 
563
          || _accidental->hasBracket())
563
564
         ) {
564
565
            _accidental->write(xml);
565
566
            }
747
748
 
748
749
void Note::endDrag()
749
750
      {
 
751
      dragMode     = false;
750
752
      if (_lineOffset == 0)
751
753
            return;
752
754
      setLine(_line + _lineOffset);
753
755
      _lineOffset  = 0;
754
 
      dragMode     = false;
755
756
      int staffIdx = chord()->staffIdx() + chord()->staffMove();
756
757
      Staff* staff = score()->staff(staffIdx);
757
758
      int tick     = chord()->tick();
758
759
      int clef     = staff->clef(tick);
759
760
      int key      = staff->key(tick).accidentalType();
760
761
      int npitch   = line2pitch(_line, clef, key);
761
 
      score()->undoChangePitch(this, npitch, pitch2tpc(npitch, key), 0);
 
762
 
 
763
      Note* n = this;
 
764
      while (n->tieBack())
 
765
            n = n->tieBack()->startNote();
 
766
      for (; n; n = n->tieFor() ? n->tieFor()->endNote() : 0)
 
767
            score()->undoChangePitch(n, npitch, pitch2tpc(npitch, key), 0);
 
768
 
762
769
      score()->select(this, SELECT_SINGLE, 0);
763
770
      }
764
771
 
1156
1163
                              score()->undoChangeUserMirror(note, DirectionH(vp.getUserMirror()));
1157
1164
                        if (vp.getHeadType() != note->headType() || vp.getHeadGroup() != note->headGroup())
1158
1165
                              score()->undo()->push(new ChangeNoteHead(note, vp.getHeadGroup(), vp.getHeadType()));
1159
 
                        }
1160
 
                  if (veloType() != vp.veloType() || velocity() != vp.velo()
1161
 
                     || veloOffset() != vp.veloOffset()
1162
 
                     || onTimeType() != vp.onTimeType() || onTimeOffset() != vp.onTimeOffset()
1163
 
                     || onTimeUserOffset() != vp.onTimeUserOffset()
1164
 
                     || offTimeType() != vp.offTimeType() || offTimeOffset() != vp.offTimeOffset()
1165
 
                     || offTimeUserOffset() != vp.offTimeUserOffset()) {
1166
 
                        score()->undo()->push(new ChangeNoteProperties(this,
1167
 
                           vp.veloType(), vp.velo(), vp.veloOffset(),
1168
 
                           vp.onTimeType(), vp.onTimeOffset(), vp.onTimeUserOffset(),
1169
 
                           vp.offTimeType(), vp.offTimeOffset(), vp.offTimeUserOffset()));
 
1166
                        if (note->veloType() != vp.veloType() || note->velocity() != vp.velo()
 
1167
                         || note->veloOffset() != vp.veloOffset()
 
1168
                         || note->onTimeType() != vp.onTimeType() || note->onTimeOffset() != vp.onTimeOffset()
 
1169
                         || note->onTimeUserOffset() != vp.onTimeUserOffset()
 
1170
                         || note->offTimeType() != vp.offTimeType() || note->offTimeOffset() != vp.offTimeOffset()
 
1171
                         || note->offTimeUserOffset() != vp.offTimeUserOffset()) {
 
1172
                              score()->undo()->push(new ChangeNoteProperties(note,
 
1173
                                 vp.veloType(), vp.velo(), vp.veloOffset(),
 
1174
                                 vp.onTimeType(), vp.onTimeOffset(), vp.onTimeUserOffset(),
 
1175
                                 vp.offTimeType(), vp.offTimeOffset(), vp.offTimeUserOffset()));
 
1176
                              }
1170
1177
                        }
1171
1178
                  }
1172
1179
            }
1231
1238
      if (acci != ACC_NONE && !_tieBack && !_hidden) {
1232
1239
            if (!_accidental)
1233
1240
                  add(new Accidental(score()));
1234
 
            _accidental->setSubtype(acci);
 
1241
            _accidental->setSubtype(acci & 0x7fff);
 
1242
            if (acci & 0x8000)
 
1243
                  _accidental->setHasBracket(true);
1235
1244
            }
1236
1245
      else {
1237
1246
            if (_accidental) {