Instrument: introduced flags to replace virtual property getters

There'll be more and more flags for instruments. Handling them using
virtual and overloaded getter functions doesn't scale well and adds
unneccessary overhead.
This commit is contained in:
Tobias Doerffel
2014-03-08 12:47:42 +01:00
parent 83af61836f
commit 1c66bb9d66
7 changed files with 29 additions and 21 deletions

View File

@@ -1319,7 +1319,7 @@ void InstrumentTrackWindow::modelChanged()
m_effectChannelNumber->setModel( &m_track->m_effectChannelModel );
m_pianoView->setModel( &m_track->m_piano );
if( m_track->instrument() && m_track->instrument()->isBendable() )
if( m_track->instrument() && m_track->instrument()->flags().testFlag( Instrument::IsNotBendable ) == false )
{
m_pitchKnob->setModel( &m_track->m_pitchModel );
m_pitchRangeSpinBox->setModel( &m_track->m_pitchRangeModel );