From 082dbed8e9eb7194c96e0f51e79b6e7d84032a03 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Mon, 24 Apr 2017 02:21:32 +0200 Subject: [PATCH] Revert "'Off beat' beat notes to MelodyPattern" This reverts commit e4474af091e9e94fbe06740e680c3fe9289a2178. --- include/Pattern.h | 3 ++- src/gui/editors/PianoRoll.cpp | 5 ----- src/tracks/Pattern.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/Pattern.h b/include/Pattern.h index 94eef796c..41b76553c 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -88,7 +88,7 @@ public: { return m_patternType; } - void checkType(); + // next/previous track based on position in the containing track Pattern * previousPattern() const; @@ -132,6 +132,7 @@ private: MidiTime beatPatternLength() const; void setType( PatternTypes _new_pattern_type ); + void checkType(); void resizeToFirstTrack(); diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 4ef28cfab..ced4e58a6 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -2459,11 +2459,6 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift, bool ctrl ) note->setPos( MidiTime( pos_ticks ) ); note->setKey( key_num ); - // If dragging beat notes check if pattern should be MelodyPattern - if( note->length() < 0 ) - { - m_pattern->checkType(); - } } } } diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 6757df22b..0e24efc8b 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -361,9 +361,7 @@ void Pattern::checkType() NoteVector::Iterator it = m_notes.begin(); while( it != m_notes.end() ) { - if( ( *it )->length() > 0 || - ( *it )->pos() % ( MidiTime::ticksPerTact() / - MidiTime::stepsPerTact() ) ) + if( ( *it )->length() > 0 ) { setType( MelodyPattern ); return;