From 8416cd60debab1eb95eae164d441138cc36702a7 Mon Sep 17 00:00:00 2001 From: z-up Date: Tue, 28 Mar 2017 16:27:56 +0300 Subject: [PATCH] Always highlight the beats in PianoRoll and AutomationEditor using only time signature (#3458) * Duration of the beat is defined by the denominator of the time signature and it does not depend on whether or not you use triplets. * Fortmatting fixed. --- src/gui/editors/AutomationEditor.cpp | 7 ------- src/gui/editors/PianoRoll.cpp | 6 ------ 2 files changed, 13 deletions(-) diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index 772140159..e2c58f286 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -1253,13 +1253,6 @@ void AutomationEditor::paintEvent(QPaintEvent * pe ) int ticksPerBeat = DefaultTicksPerTact / Engine::getSong()->getTimeSigModel().getDenominator(); - // triplet mode occurs if the note quantization isn't a multiple of 3 - // note that the automation editor does not support triplets yet - if( AutomationPattern::quantization() % 3 != 0 ) - { - ticksPerBeat = static_cast( ticksPerBeat * 2.0/3.0 ); - } - for( tick = m_currentPosition - m_currentPosition % ticksPerBeat, x = xCoordOfTick( tick ); x<=width(); diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 661a8b026..4ef28cfab 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -2913,12 +2913,6 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) int ticksPerBeat = DefaultTicksPerTact / Engine::getSong()->getTimeSigModel().getDenominator(); - // triplet mode occurs if the note quantization isn't a multiple of 3 - if( quantization() % 3 != 0 ) - { - ticksPerBeat = static_cast( ticksPerBeat * 2.0/3.0 ); - } - for( tick = m_currentPosition - m_currentPosition % ticksPerBeat, x = xCoordOfTick( tick ); x <= width(); tick += ticksPerBeat, x = xCoordOfTick( tick ) )