Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion plugins/GigPlayer/GigPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,6 @@ void GigInstrumentView::showFileDialog()
types << tr( "GIG Files (*.gig)" );
ofd.setNameFilters( types );

QString dir;
if( k->m_filename != "" )
{
QString f = SampleBuffer::tryToMakeAbsolute( k->m_filename );
Expand Down
1 change: 0 additions & 1 deletion plugins/sf2_player/sf2_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,6 @@ void sf2InstrumentView::showFileDialog()
types << tr( "SoundFont2 Files (*.sf2)" );
ofd.setNameFilters( types );

QString dir;
if( k->m_filename != "" )
{
QString f = SampleBuffer::tryToMakeAbsolute( k->m_filename );
Expand Down
39 changes: 11 additions & 28 deletions plugins/vestige/vestige.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "Mixer.h"
#include "GuiApplication.h"
#include "PixmapButton.h"
#include "SampleBuffer.h"
#include "StringPairDrag.h"
#include "TextFloat.h"
#include "ToolTip.h"
Expand Down Expand Up @@ -173,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 @@ -253,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,6 +257,7 @@ void vestigeInstrument::loadFile( const QString & _file )
closePlugin();
delete tf;
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( m_pluginDLL ) );
m_pluginDLL = "";
return;
}

Expand Down Expand Up @@ -613,29 +603,22 @@ void VestigeInstrumentView::openPlugin()
{
FileDialog ofd( NULL, tr( "Open VST-plugin" ) );

QString dir;
if( m_vi->m_pluginDLL != "" )
{
dir = QFileInfo( m_vi->m_pluginDLL ).absolutePath();
}
else
{
dir = ConfigManager::inst()->vstDir();
}
// change dir to position of previously opened file
ofd.setDirectory( dir );
ofd.setFileMode( FileDialog::ExistingFiles );

// set filters
QStringList types;
types << tr( "DLL-files (*.dll)" )
<< tr( "EXE-files (*.exe)" )
;
ofd.setNameFilters( types );

if( m_vi->m_pluginDLL != "" )
{
// select previously opened file
ofd.selectFile( QFileInfo( m_vi->m_pluginDLL ).fileName() );
QString f = SampleBuffer::tryToMakeAbsolute( m_vi->m_pluginDLL );
ofd.setDirectory( QFileInfo( f ).absolutePath() );
ofd.selectFile( QFileInfo( f ).fileName() );
}
else
{
ofd.setDirectory( ConfigManager::inst()->vstDir() );
}

if ( ofd.exec () == QDialog::Accepted )
Expand Down