diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index a71030dff..7571ddfbe 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -392,9 +392,7 @@ void AutomationPattern::flipY( int min, int max ) int numPoints = 0; - //(iterate+1).key() - iterate.key(); gets the number of values until the next point - - for( int i = 0; (iterate + i + 1) != m_timeMap.end() && (iterate + i ) != m_timeMap.end() ; i++) + for( int i = 0; ( iterate + i + 1 ) != m_timeMap.end() && ( iterate + i ) != m_timeMap.end() ; i++) { numPoints++; } @@ -402,17 +400,15 @@ void AutomationPattern::flipY( int min, int max ) for( int i = 0; i <= numPoints; i++ ) { - if (min < 0) + if ( min < 0 ) { - tempValue = valueAt((iterate + i).key()) * -1; - //removeValue((iterate + i).key(), false); - putValue( MidiTime((iterate + i).key()) , tempValue, false); + tempValue = valueAt( ( iterate + i ).key() ) * -1; + putValue( MidiTime( (iterate + i).key() ) , tempValue, false); } else { - tempValue = max - valueAt((iterate + i).key()); - //removeValue((iterate).key(), false); - putValue( MidiTime((iterate + i).key()) , tempValue, false); + tempValue = max - valueAt( ( iterate + i ).key() ); + putValue( MidiTime( (iterate + i).key() ) , tempValue, false); } } @@ -425,7 +421,7 @@ void AutomationPattern::flipY( int min, int max ) -void AutomationPattern::flipX(bool visible) +void AutomationPattern::flipX( bool visible ) { timeMap tempMap; @@ -433,22 +429,22 @@ void AutomationPattern::flipX(bool visible) float tempValue = 0; int numPoints = 0; - //(iterate+1).key() - iterate.key(); gets the number of values until the next point + //(iterate+1).key() - iterate.key(); gets the "distance" to the next point - for( int i = 0; (iterate + i + 1) != m_timeMap.end() && (iterate + i ) != m_timeMap.end() ; i++) + for( int i = 0; ( iterate + i + 1 ) != m_timeMap.end() && ( iterate + i ) != m_timeMap.end() ; i++) { numPoints++; } - float realLength = (iterate + numPoints).key(); + float realLength = ( iterate + numPoints ).key(); for( int i = 0; i <= numPoints; i++ ) { - tempValue = valueAt((iterate + i).key()); + tempValue = valueAt( ( iterate + i ).key() ); cleanObjects(); - MidiTime newTime = MidiTime( realLength - (iterate + i).key() ); + MidiTime newTime = MidiTime( realLength - ( iterate + i ).key() ); tempMap[newTime] = tempValue; } diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index a05d378b3..3468299b8 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -2064,7 +2064,7 @@ void AutomationEditor::eraseButtonToggled() void AutomationEditor::flipYButtonPressed() { - m_pattern->flipY(m_minLevel, m_maxLevel); + m_pattern->flipY( m_minLevel, m_maxLevel ); } diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index a65fd1a08..869c1ef82 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -149,7 +149,7 @@ void AutomationPatternView::toggleRecording() void AutomationPatternView::flipY() { - m_pat->flipY(m_pat->getMin(), m_pat->getMax()); + m_pat->flipY( m_pat->getMin(), m_pat->getMax() ); update(); }