From d82227aefb79ffc31c16f1061db81bc13457e0ba Mon Sep 17 00:00:00 2001 From: Mike Choi Date: Tue, 12 Feb 2013 23:29:34 +0100 Subject: [PATCH] Vestige: Path to VST plugins stored as relative, if opened from default VST plugin path Path to VST plugin will be stored as relative, if plugin is opened from default VST plugin path. Should remain compatible with project saves from old releases or vice versa. Signed-off-by: Tobias Doerffel --- plugins/vestige/vestige.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index df636c412..023e9ce5d 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -169,6 +169,16 @@ void vestigeInstrument::setParameter( void ) void vestigeInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) { + if( QFileInfo( m_pluginDLL ).isAbsolute() ) + { + QString relativePath; + if( !( relativePath = m_pluginDLL.section( configManager:: + inst()->vstDir(), 1, 1 ) ).isEmpty() ) + { + m_pluginDLL = relativePath; + } + } + _this.setAttribute( "plugin", m_pluginDLL ); m_pluginMutex.lock(); if( m_plugin != NULL )