Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a7a1e61f86
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 64 lines (55 sloc) 1.838 kb
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
//=============================================================================
// MuseScore
// Music Composition & Notation
// $Id: excerpt.cpp 5149 2011-12-29 08:38:43Z wschweer $
//
// Copyright (C) 2009-2012 Werner Schweer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in
// the file LICENCE.GPL
//=============================================================================

#include "elementmap.h"
#include "tupletmap.h"
#include "slurmap.h"
#include "tiemap.h"
#include "spannermap.h"
#include "slur.h"
#include "chordrest.h"

//---------------------------------------------------------
// findNew
//---------------------------------------------------------

Tuplet* TupletMap::findNew(Tuplet* o)
      {
      foreach(const Tuplet2& t2, map) {
            if (t2.o == o)
                  return t2.n;
            }
      return 0;
      }

//---------------------------------------------------------
// findNew
//---------------------------------------------------------

Slur* SlurMap::findNew(Slur* o)
      {
      foreach(const Slur2& s2, map) {
            if (s2.o == o)
                  return s2.n;
            }
      return 0;
      }

//---------------------------------------------------------
// check
//---------------------------------------------------------

void SlurMap::check()
      {
      foreach(const Slur2& s2, map) {
            Slur* slur = s2.n;
            if (slur->endElement() == 0) {
                  qDebug("slur end element missing %p new %p\n", s2.o, s2.n);
                  static_cast<ChordRest*>(slur->startElement())->removeSlurFor(slur);
                  delete slur;
                  }
            }
      }

Something went wrong with that request. Please try again.