From ac7aa69ad11270c1e7845c12d3b333a3345be390 Mon Sep 17 00:00:00 2001 From: Dave French Date: Mon, 20 Jul 2015 00:36:01 +0100 Subject: [PATCH] Revert Correct Priorty of fade button reverted changes made in #1527 copied from Github diff Fixes #1932 --- include/InstrumentTrack.h | 4 +--- src/tracks/InstrumentTrack.cpp | 15 ++++----------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 6475a8622..5dcb4db40 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -206,13 +206,13 @@ public: return &m_effectChannelModel; } - void setIndicator( FadeButton *fb ); signals: void instrumentChanged(); void midiNoteOn( const Note& ); void midiNoteOff( const Note& ); void nameChanged(); + void newNote(); protected: @@ -255,8 +255,6 @@ private: IntModel m_effectChannelModel; BoolModel m_useMasterPitchModel; - FadeButton *m_fb; - Instrument * m_instrument; InstrumentSoundShaping m_soundShaping; diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index d3158e328..f0892f2e6 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -51,7 +51,6 @@ #include "EffectRackView.h" #include "embed.h" #include "Engine.h" -#include "FadeButton.h" #include "FileBrowser.h" #include "FxMixer.h" #include "FxMixerView.h" @@ -116,7 +115,6 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) : m_pitchRangeModel( 1, 1, 24, this, tr( "Pitch range" ) ), m_effectChannelModel( 0, 0, 0, this, tr( "FX channel" ) ), m_useMasterPitchModel( true, this, tr( "Master Pitch") ), - m_fb( NULL ), m_instrument( NULL ), m_soundShaping( this ), m_arpeggio( this ), @@ -391,7 +389,7 @@ void InstrumentTrack::processOutEvent( const MidiEvent& event, const MidiTime& t } m_midiNotesMutex.unlock(); - if( m_fb ) { m_fb->activate(); } + emit newNote(); break; case MidiNoteOff: @@ -573,12 +571,6 @@ void InstrumentTrack::removeMidiPortNode( DataFile & _dataFile ) n.item( 0 ).parentNode().removeChild( n.item( 0 ) ); } -void InstrumentTrack::setIndicator(FadeButton *fb) -{ - m_fb = fb; -} - - @@ -930,7 +922,8 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV this, SLOT( activityIndicatorPressed() ) ); connect( m_activityIndicator, SIGNAL( released() ), this, SLOT( activityIndicatorReleased() ) ); - _it->setIndicator( m_activityIndicator ); + connect( _it, SIGNAL( newNote() ), + m_activityIndicator, SLOT( activate() ) ); connect( &_it->m_mutedModel, SIGNAL( dataChanged() ), this, SLOT( muteChanged() ) ); setModel( _it ); @@ -1779,4 +1772,4 @@ void InstrumentTrackWindow::viewNextInstrument() void InstrumentTrackWindow::viewPrevInstrument() { viewInstrumentInDirection(-1); -} \ No newline at end of file +}