Collect effects errors to show on summary window

This commit is contained in:
Amadeus Folego
2014-12-29 00:27:11 -02:00
parent 1459be1a2c
commit 3dd1da4e25
4 changed files with 7 additions and 22 deletions

View File

@@ -58,16 +58,6 @@ public:
static bool hasGUI();
static void setSuppressMessages( bool _on )
{
s_suppressMessages = _on;
}
static bool suppressMessages()
{
return !hasGUI() || s_suppressMessages;
}
// core
static Mixer *mixer()
{
@@ -127,7 +117,7 @@ private:
delete tmp;
}
static bool s_suppressMessages;
static bool s_hasGUI;
static float s_framesPerTick;
// core

View File

@@ -39,6 +39,7 @@
#include "ControllerConnection.h"
#include "MemoryManager.h"
#include "ValueBuffer.h"
#include "MainWindow.h"
#include "embed.cpp"
@@ -74,12 +75,11 @@ LadspaEffect::LadspaEffect( Model * _parent,
Ladspa2LMMS * manager = Engine::getLADSPAManager();
if( manager->getDescription( m_key ) == NULL )
{
if( !Engine::suppressMessages() )
if ( Engine::hasGUI() )
{
QMessageBox::warning( 0, tr( "Effect" ),
tr( "Unknown LADSPA plugin %1 requested." ).
arg( m_key.second ),
QMessageBox::Ok, QMessageBox::NoButton );
Engine::mainWindow()->collectError(
tr( "Unknown LADSPA plugin %1 requested." ).arg(
m_key.second ) );
}
setOkay( false );
return;

View File

@@ -40,8 +40,7 @@
#include "GuiApplication.h"
bool Engine::s_suppressMessages = false;
bool Engine::s_hasGUI = true;
float Engine::s_framesPerTick;
Mixer* Engine::s_mixer = NULL;
FxMixer * Engine::s_fxMixer = NULL;

View File

@@ -126,8 +126,6 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
const bool j = Engine::projectJournal()->isJournalling();
Engine::projectJournal()->setJournalling( false );
Engine::setSuppressMessages( true );
if( _load_by_plugin )
{
Instrument * i = s_previewTC->previewInstrumentTrack()->instrument();
@@ -162,8 +160,6 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
}
}
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()->