* do not show messages about missing plugins when previewing presets (closes #2110203)

* clear effect view before loading settings in effectChain



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1612 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-09-16 12:31:14 +00:00
parent 540c71922d
commit 6785d3b436
9 changed files with 58 additions and 12 deletions

View File

@@ -1,5 +1,3 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* effect_chain.cpp - class for processing and effects chain
*
@@ -38,6 +36,7 @@
effectChain::effectChain( model * _parent ) :
model( _parent ),
serializingObject(),
m_enabledModel( FALSE, NULL, tr( "Effects enabled" ) )
{
}
@@ -253,7 +252,9 @@ bool effectChain::isRunning( void )
void effectChain::clear( void )
{
m_enabledModel.setValue( FALSE );
emit aboutToClear();
m_enabledModel.setValue( false );
for( int i = 0; i < m_effects.count(); ++i )
{
delete m_effects[i];
@@ -262,4 +263,6 @@ void effectChain::clear( void )
}
#endif
#include "moc_effect_chain.cxx"

View File

@@ -45,7 +45,8 @@
#include "song.h"
bool engine::s_hasGUI = TRUE;
bool engine::s_hasGUI = true;
bool engine::s_suppressMessages = false;
float engine::s_framesPerTick;
mixer * engine::s_mixer = NULL;
fxMixer * engine::s_fxMixer = NULL;

View File

@@ -120,6 +120,8 @@ presetPreviewPlayHandle::presetPreviewPlayHandle( const QString & _preset_file,
const bool j = engine::getProjectJournal()->isJournalling();
engine::getProjectJournal()->setJournalling( FALSE );
engine::setSuppressMessages( true );
if( _load_by_plugin )
{
instrument * i = s_previewTC->previewInstrumentTrack()->
@@ -145,6 +147,8 @@ presetPreviewPlayHandle::presetPreviewPlayHandle( const QString & _preset_file,
mmp.content().firstChild().toElement() );
}
engine::setSuppressMessages( false );
// make sure, our preset-preview-track does not appear in any MIDI-
// devices list, so just disable receiving/sending MIDI-events at all
s_previewTC->previewInstrumentTrack()->m_midiPort.setMode(

View File

@@ -246,6 +246,8 @@ void effectRackView::modelChanged( void )
{
clearViews();
m_effectsGroupBox->setModel( &fxChain()->m_enabledModel );
connect( fxChain(), SIGNAL( aboutToClear() ),
this, SLOT( clearViews() ) );
update();
}