Skip to content

Commit

Permalink
Open correct VST folder in previously saved projects with existing Ve…
Browse files Browse the repository at this point in the history
…STige instruments.
  • Loading branch information
karmux committed May 10, 2017
1 parent baca586 commit 33c7b5a
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions plugins/vestige/vestige.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,6 @@ void vestigeInstrument::setParameter( void )

void vestigeInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
if( QFileInfo( m_pluginDLL ).isAbsolute() )
{
QString f = QString( m_pluginDLL ).replace( QDir::separator(), '/' );
QString vd = QString( ConfigManager::inst()->vstDir() ).replace( QDir::separator(), '/' );
QString relativePath;
if( !( relativePath = f.section( vd, 1, 1 ) ).isEmpty() )
{
m_pluginDLL = relativePath;
}
}

_this.setAttribute( "plugin", m_pluginDLL );
m_pluginMutex.lock();
if( m_plugin != NULL )
Expand Down Expand Up @@ -254,8 +243,7 @@ void vestigeInstrument::loadFile( const QString & _file )
{
closePlugin();
}

m_pluginDLL = _file;
m_pluginDLL = SampleBuffer::tryToMakeRelative( _file );
TextFloat * tf = TextFloat::displayMessage(
tr( "Loading plugin" ),
tr( "Please wait while loading VST-plugin..." ),
Expand All @@ -268,7 +256,7 @@ void vestigeInstrument::loadFile( const QString & _file )
m_pluginMutex.unlock();
closePlugin();
delete tf;
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( m_pluginDLL ) );
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( QFileInfo( _file ).baseName() ) );
return;
}

Expand Down

0 comments on commit 33c7b5a

Please sign in to comment.