diff framework/MainWindowBase.cpp @ 222:ed5804224121 templating

Store default template name in MainWindowBase
author Chris Cannam
date Mon, 09 May 2011 11:56:24 +0100
parents e06a0124c662
children e8ae978e1a3d
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed Apr 27 14:46:06 2011 +0100
+++ b/framework/MainWindowBase.cpp	Mon May 09 11:56:24 2011 +0100
@@ -327,6 +327,18 @@
 }
 
 void
+MainWindowBase::setDefaultSessionTemplate(QString name)
+{
+    m_defaultSessionTemplate = name;
+}
+
+QString
+MainWindowBase::getDefaultSessionTemplate() const
+{
+    return m_defaultSessionTemplate;
+}
+
+void
 MainWindowBase::updateMenuStates()
 {
     Pane *currentPane = 0;
@@ -1075,7 +1087,9 @@
 {
 //    std::cerr << "MainWindowBase::openAudio(" << source.getLocation().toStdString() << ")" << std::endl;
 
-    if (templateName == "") templateName = "testtemplate";
+    if (templateName == "") {
+        templateName = m_defaultSessionTemplate;
+    }
 
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();