Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 226:2c827ac7c8e7 templating
When saving a session as a template, use the silent.wav placeholder instead of the main model
author | Chris Cannam |
---|---|
date | Wed, 11 May 2011 12:23:55 +0100 |
parents | 9d50c42d7ca0 |
children | a6398a7400c1 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Tue May 10 19:37:45 2011 +0100 +++ b/framework/MainWindowBase.cpp Wed May 11 12:23:55 2011 +0100 @@ -1961,7 +1961,7 @@ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QTextStream out(&bzFile); - toXml(out); + toXml(out, false); out.flush(); QApplication::restoreOverrideCursor(); @@ -2006,7 +2006,7 @@ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QTextStream out(&file); - toXml(out); + toXml(out, true); out.flush(); QApplication::restoreOverrideCursor(); @@ -2025,7 +2025,7 @@ } void -MainWindowBase::toXml(QTextStream &out) +MainWindowBase::toXml(QTextStream &out, bool asTemplate) { QString indent(" "); @@ -2033,7 +2033,11 @@ out << "<!DOCTYPE sonic-visualiser>\n"; out << "<sv>\n"; - m_document->toXml(out, "", ""); + if (asTemplate) { + m_document->toXmlAsTemplate(out, "", ""); + } else { + m_document->toXml(out, "", ""); + } out << "<display>\n";