InstrumentTrack: removed option for disabling PianoView visual feedback

Probably never used by anyone and just makes code unneccessarily complex.
This commit is contained in:
Tobias Doerffel
2014-01-26 00:14:16 +01:00
parent 3a827f061f
commit 7d395c00fa
3 changed files with 9 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
/*
* setup_dialog.h - dialog for setting up LMMS
*
* Copyright (c) 2005-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -103,7 +103,6 @@ private slots:
void openBackgroundArtwork();
void toggleDisableChActInd( bool _disabled );
void toggleManualChPiano( bool _enabled );
void toggleSmoothScroll( bool _enabled );
void toggleAutoSave( bool _enabled );
void toggleOneInstrumentTrackWindow( bool _enabled );
@@ -155,7 +154,6 @@ private:
QString m_backgroundArtwork;
bool m_disableChActInd;
bool m_manualChPiano;
bool m_smoothScroll;
bool m_enableAutoSave;
bool m_oneInstrumentTrackWindow;

View File

@@ -1,7 +1,7 @@
/*
* setup_dialog.cpp - dialog for setting up LMMS
*
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -110,8 +110,6 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
m_backgroundArtwork( configManager::inst()->backgroundArtwork() ),
m_disableChActInd( configManager::inst()->value( "ui",
"disablechannelactivityindicators" ).toInt() ),
m_manualChPiano( configManager::inst()->value( "ui",
"manualchannelpiano" ).toInt() ),
m_smoothScroll( configManager::inst()->value( "ui", "smoothscroll" ).toInt() ),
m_enableAutoSave( configManager::inst()->value( "ui", "enableautosave" ).toInt() ),
m_oneInstrumentTrackWindow( configManager::inst()->value( "ui",
@@ -524,17 +522,9 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
this, SLOT( toggleDisableChActInd( bool ) ) );
ledCheckBox * manual_ch_piano = new ledCheckBox(
tr( "Only press keys on channel-piano manually" ),
ui_fx_tw );
manual_ch_piano->move( 10, 40 );
manual_ch_piano->setChecked( m_manualChPiano );
connect( manual_ch_piano, SIGNAL( toggled( bool ) ),
this, SLOT( toggleManualChPiano( bool ) ) );
ledCheckBox * smoothScroll = new ledCheckBox(
tr( "Smooth scroll in Song Editor" ), ui_fx_tw );
smoothScroll->move( 10, 60 );
smoothScroll->move( 10, 40 );
smoothScroll->setChecked( m_smoothScroll );
connect( smoothScroll, SIGNAL( toggled( bool ) ),
this, SLOT( toggleSmoothScroll( bool ) ) );
@@ -542,7 +532,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
ledCheckBox * autoSave = new ledCheckBox(
tr( "Enable auto save feature" ), ui_fx_tw );
autoSave->move( 10, 80 );
autoSave->move( 10, 60 );
autoSave->setChecked( m_enableAutoSave );
connect( autoSave, SIGNAL( toggled( bool ) ),
this, SLOT( toggleAutoSave( bool ) ) );
@@ -551,7 +541,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
ledCheckBox * animAFP = new ledCheckBox(
tr( "Show playback cursor in AudioFileProcessor" ),
ui_fx_tw );
animAFP->move( 10, 100 );
animAFP->move( 10, 80 );
animAFP->setChecked( m_animateAFP );
connect( animAFP, SIGNAL( toggled( bool ) ),
this, SLOT( toggleAnimateAFP( bool ) ) );
@@ -821,8 +811,6 @@ void setupDialog::accept()
configManager::inst()->setValue( "ui",
"disablechannelactivityindicators",
QString::number( m_disableChActInd ) );
configManager::inst()->setValue( "ui", "manualchannelpiano",
QString::number( m_manualChPiano ) );
configManager::inst()->setValue( "ui", "smoothscroll",
QString::number( m_smoothScroll ) );
configManager::inst()->setValue( "ui", "enableautosave",
@@ -987,15 +975,6 @@ void setupDialog::toggleDisableChActInd( bool _disabled )
void setupDialog::toggleManualChPiano( bool _enabled )
{
m_manualChPiano = _enabled;
}
void setupDialog::toggleSmoothScroll( bool _enabled )
{
m_smoothScroll = _enabled;

View File

@@ -237,10 +237,8 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti
{
if( m_notes[event.key()] == NULL )
{
if( !configManager::inst()->value( "ui", "manualchannelpiano" ).toInt() )
{
m_piano.setKeyState( event.key(), true );
}
m_piano.setKeyState( event.key(), true );
// create temporary note
note n;
n.setKey( event.key() );
@@ -365,10 +363,7 @@ void InstrumentTrack::processOutEvent( const MidiEvent& event, const MidiTime& t
switch( event.type() )
{
case MidiNoteOn:
if( !configManager::inst()->value( "ui", "manualchannelpiano" ).toInt() )
{
m_piano.setKeyState( event.key(), true );
}
m_piano.setKeyState( event.key(), true );
if( !configManager::inst()->value( "ui", "disablechannelactivityindicators" ).toInt() )
{
if( m_notes[event.key()] == NULL )
@@ -389,10 +384,7 @@ void InstrumentTrack::processOutEvent( const MidiEvent& event, const MidiTime& t
break;
case MidiNoteOff:
if( !configManager::inst()->value( "ui", "manualchannelpiano" ).toInt() )
{
m_piano.setKeyState( event.key(), false );
}
m_piano.setKeyState( event.key(), false );
k = masterKey( event.key() );
if( k >= 0 && k < NumKeys && --m_runningMidiNotes[k] <= 0 )
{