From 86f3854782f91d53af033cd220602f4392973402 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 18 Aug 2014 22:02:16 +0200 Subject: [PATCH] DataFile: write new header information only for song projects No need to write these for presets etc. --- src/core/DataFile.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 39be0e4bc..27b5a4dc9 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -689,16 +689,19 @@ void DataFile::upgrade() documentElement().setAttribute( "creator", "LMMS" ); documentElement().setAttribute( "creatorversion", LMMS_VERSION ); - // Time-signature - if ( !m_head.hasAttribute( "timesig_numerator" ) ) + if( type() == SongProject || type() == SongProjectTemplate ) { - m_head.setAttribute( "timesig_numerator", 4 ); - m_head.setAttribute( "timesig_denominator", 4 ); - } + // Time-signature + if ( !m_head.hasAttribute( "timesig_numerator" ) ) + { + m_head.setAttribute( "timesig_numerator", 4 ); + m_head.setAttribute( "timesig_denominator", 4 ); + } - if( !m_head.hasAttribute( "mastervol" ) ) - { - m_head.setAttribute( "mastervol", 100 ); + if( !m_head.hasAttribute( "mastervol" ) ) + { + m_head.setAttribute( "mastervol", 100 ); + } } //printf("%s\n", toString( 2 ).toUtf8().constData()); }