implemented proper behaviour for VST plugins
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "config_mgr.h"
|
||||
#include "DummyPlugin.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
static PixmapLoader __dummy_loader;
|
||||
@@ -62,7 +63,6 @@ Plugin::Plugin( const Descriptor * _descriptor, Model * parent ) :
|
||||
{
|
||||
m_descriptor = &dummy_plugin_descriptor;
|
||||
}
|
||||
m_errorReport = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,17 +125,9 @@ Plugin * Plugin::instantiate( const QString & pluginName, Model * parent,
|
||||
return inst;
|
||||
}
|
||||
|
||||
QList<QString>* Plugin::getErrorReport()
|
||||
{
|
||||
return m_errorReport;
|
||||
}
|
||||
|
||||
void Plugin::logError( QString err_msg )
|
||||
{
|
||||
if ( m_errorReport == NULL ) {
|
||||
m_errorReport = new QList<QString>();
|
||||
}
|
||||
m_errorReport->append( err_msg );
|
||||
engine::mainWindow()->collectError( err_msg );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1181,7 +1181,8 @@ void MainWindow::clearErrors()
|
||||
|
||||
|
||||
void MainWindow::showErrors( const QString message )
|
||||
{ if ( m_errors->length() != 0 )
|
||||
{
|
||||
if ( m_errors->length() != 0 )
|
||||
{ QString* errors = new QString();
|
||||
for ( int i = 0 ; i < m_errors->length() ; i++ )
|
||||
{
|
||||
|
||||
@@ -820,11 +820,8 @@ Instrument * InstrumentTrack::loadInstrument( const QString & _plugin_name )
|
||||
delete m_instrument;
|
||||
m_instrument = Instrument::instantiate( _plugin_name, this );
|
||||
unlock();
|
||||
|
||||
if ( m_instrument->getErrorReport() != NULL )
|
||||
engine::mainWindow()->collectErrors( m_instrument->getErrorReport() );
|
||||
|
||||
setName( m_instrument->displayName() );
|
||||
|
||||
emit instrumentChanged();
|
||||
|
||||
return m_instrument;
|
||||
|
||||
Reference in New Issue
Block a user