diff --git a/include/setup_dialog.h b/include/setup_dialog.h index 4bac5e0fe..82f66eae8 100644 --- a/include/setup_dialog.h +++ b/include/setup_dialog.h @@ -110,6 +110,7 @@ private slots: void toggleCompactTrackButtons( bool _enabled ); void toggleSyncVSTPlugins( bool _enabled ); void toggleAnimateAFP( bool _enabled ); + void toggleNoteLabels( bool en ); private: @@ -160,6 +161,7 @@ private: bool m_compactTrackButtons; bool m_syncVSTPlugins; bool m_animateAFP; + bool m_printNoteLabels; typedef QMap AswMap; typedef QMap MswMap; diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index f9b8110c6..62c003a31 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -45,6 +45,7 @@ #include #include +#include "config_mgr.h" #include "piano_roll.h" #include "bb_track_container.h" #include "Clipboard.h" @@ -3163,7 +3164,10 @@ void pianoRoll::paintEvent( QPaintEvent * _pe ) *cursor ); } - printNoteHeights(p, keyAreaBottom(), width(), m_startKey); + if( configManager::inst()->value( "ui", "printnotelabels").toInt() ) + { + printNoteHeights(p, keyAreaBottom(), width(), m_startKey); + } } diff --git a/src/gui/setup_dialog.cpp b/src/gui/setup_dialog.cpp index 14b955e0e..3d60175cf 100644 --- a/src/gui/setup_dialog.cpp +++ b/src/gui/setup_dialog.cpp @@ -121,7 +121,9 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : m_syncVSTPlugins( configManager::inst()->value( "ui", "syncvstplugins" ).toInt() ), m_animateAFP(configManager::inst()->value( "ui", - "animateafp").toInt() ) + "animateafp").toInt() ), + m_printNoteLabels(configManager::inst()->value( "ui", + "printnotelabels").toInt() ) { setWindowIcon( embed::getIconPixmap( "setup_general" ) ); setWindowTitle( tr( "Setup LMMS" ) ); @@ -271,6 +273,15 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( syncVST, SIGNAL( toggled( bool ) ), this, SLOT( toggleSyncVSTPlugins( bool ) ) ); + ledCheckBox * noteLabels = new ledCheckBox( + tr( "Enable note labels in piano roll" ), + misc_tw ); + labelNumber++; + noteLabels->move( XDelta, YDelta*labelNumber ); + noteLabels->setChecked( m_printNoteLabels ); + connect( noteLabels, SIGNAL( toggled( bool ) ), + this, SLOT( toggleNoteLabels( bool ) ) ); + misc_tw->setFixedHeight( YDelta*labelNumber + HeaderSize ); @@ -813,6 +824,8 @@ void setupDialog::accept() QString::number( m_syncVSTPlugins ) ); configManager::inst()->setValue( "ui", "animateafp", QString::number( m_animateAFP ) ); + configManager::inst()->setValue( "ui", "printnotelabels", + QString::number( m_printNoteLabels ) ); configManager::inst()->setWorkingDir( m_workingDir ); @@ -1007,7 +1020,10 @@ void setupDialog::toggleAnimateAFP( bool _enabled ) } - +void setupDialog::toggleNoteLabels( bool en ) +{ + m_printNoteLabels = en; +} void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled )