fixed sampleBuffer::tryToMakeRelative() for win32 - paths to samples are now saved relative in win32-version too (if possible)

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1469 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-08-22 22:43:48 +00:00
parent c51a7ba0a2
commit 9bde7d2fb6
2 changed files with 14 additions and 4 deletions

View File

@@ -1,5 +1,12 @@
2008-08-22 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/main.cpp:
fixed splash-screen for win32
* src/core/sample_buffer.cpp:
fixed sampleBuffer::tryToMakeRelative() for win32 - paths to samples
are now saved relative in win32-version too (if possible)
* src/core/piano.cpp:
fixed keycodes for win32 version

View File

@@ -1137,15 +1137,18 @@ QString sampleBuffer::tryToMakeRelative( const QString & _file )
{
if( QFileInfo( _file ).isRelative() == FALSE )
{
QString f = QString( _file ).replace( QDir::separator(), '/' );
QString fsd = configManager::inst()->factorySamplesDir();
QString usd = configManager::inst()->userSamplesDir();
if( _file.startsWith( fsd ) )
fsd.replace( QDir::separator(), '/' );
usd.replace( QDir::separator(), '/' );
if( f.startsWith( fsd ) )
{
return( QString( _file ).mid( fsd.length() ) );
return( QString( f ).mid( fsd.length() ) );
}
else if( _file.startsWith( usd ) )
else if( f.startsWith( usd ) )
{
return( QString( _file ).mid( usd.length() ) );
return( QString( f ).mid( usd.length() ) );
}
}
return( _file );