From 411def41014ab4b257480acbf7c44d3413d6ee91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Andr=C3=A8s?= Date: Sun, 26 Mar 2017 21:51:46 +0200 Subject: [PATCH 1/5] Fix CMake warning (#3457) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6170b546..b809b3c55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -487,7 +487,7 @@ IF(USE_CCACHE) ELSE() MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found") ENDIF() -ENDIF(CCACHE_FOUND) +ENDIF() # make sub-directories ADD_SUBDIRECTORY(cmake) From 8416cd60debab1eb95eae164d441138cc36702a7 Mon Sep 17 00:00:00 2001 From: z-up Date: Tue, 28 Mar 2017 16:27:56 +0300 Subject: [PATCH 2/5] 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 ) ) From 1bfd0931be9136c6cd90f58bb8cb24288e2558f7 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Tue, 28 Mar 2017 11:54:53 +0200 Subject: [PATCH 3/5] Automation Pattern - Rename 'controlKey' (#3459) --- include/AutomationPattern.h | 2 +- src/core/AutomationPattern.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/AutomationPattern.h b/include/AutomationPattern.h index 0593e8bb1..32b4bc286 100644 --- a/include/AutomationPattern.h +++ b/include/AutomationPattern.h @@ -80,7 +80,7 @@ public: MidiTime putValue( const MidiTime & time, const float value, const bool quantPos = true, - const bool controlKey = false ); + const bool ignoreSurroundingPoints = false ); void removeValue( const MidiTime & time ); diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index aab1eaec7..c307236d5 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -206,7 +206,7 @@ void AutomationPattern::updateLength() MidiTime AutomationPattern::putValue( const MidiTime & time, const float value, const bool quantPos, - const bool controlKey ) + const bool ignoreSurroundingPoints ) { cleanObjects(); @@ -219,7 +219,7 @@ MidiTime AutomationPattern::putValue( const MidiTime & time, // Remove control points that are covered by the new points // quantization value. Control Key to override - if( ! controlKey ) + if( ! ignoreSurroundingPoints ) { for( int i = newTime + 1; i < newTime + quantization(); ++i ) { From f8bf07b093a12942ca051147da2f4b0209468ce8 Mon Sep 17 00:00:00 2001 From: Steffen Baranowsky Date: Thu, 30 Mar 2017 13:16:37 +0200 Subject: [PATCH 4/5] fix crash on click on compact track label button (#3463) Fixes #3454 --- src/gui/widgets/TrackLabelButton.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/TrackLabelButton.cpp b/src/gui/widgets/TrackLabelButton.cpp index 7288f3153..231509e74 100644 --- a/src/gui/widgets/TrackLabelButton.cpp +++ b/src/gui/widgets/TrackLabelButton.cpp @@ -48,7 +48,9 @@ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : setAcceptDrops( true ); setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) ); setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); - + m_renameLineEdit = new QLineEdit( this ); + m_renameLineEdit->hide(); + if( ConfigManager::inst()->value( "ui", "compacttrackbuttons" ).toInt() ) { setFixedSize( 32, 29 ); @@ -56,12 +58,11 @@ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : else { setFixedSize( 160, 29 ); - m_renameLineEdit = new QLineEdit( this ); m_renameLineEdit->move( 30, ( height() / 2 ) - ( m_renameLineEdit->sizeHint().height() / 2 ) ); m_renameLineEdit->setFixedWidth( width() - 33 ); - m_renameLineEdit->hide(); connect( m_renameLineEdit, SIGNAL( editingFinished() ), this, SLOT( renameFinished() ) ); } + setIconSize( QSize( 24, 24 ) ); connect( m_trackView->getTrack(), SIGNAL( dataChanged() ), this, SLOT( update() ) ); connect( m_trackView->getTrack(), SIGNAL( nameChanged() ), this, SLOT( nameChanged() ) ); From e65b1c8ba85728cfb8728840c15e7e167014da19 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Fri, 7 Apr 2017 11:40:00 +0200 Subject: [PATCH 5/5] SampleBuffer: Keep settings on sample rate change Fixes #2779 --- src/core/SampleBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index 1870c10b4..f5ec42cdb 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -152,7 +152,7 @@ SampleBuffer::~SampleBuffer() void SampleBuffer::sampleRateChanged() { - update(); + update( true ); }