diff framework/Document.cpp @ 47:d97a7ed7aa39

* Add auto-alignment toggle to Document * Make MainWindowBase cope if there is no time ruler layer
author Chris Cannam
date Thu, 25 Oct 2007 11:32:54 +0000
parents 9ea770d93fae
children c6328c8d6536
line wrap: on
line diff
--- a/framework/Document.cpp	Wed Oct 24 16:43:20 2007 +0000
+++ b/framework/Document.cpp	Thu Oct 25 11:32:54 2007 +0000
@@ -38,7 +38,8 @@
 //!!! still need to handle command history, documentRestored/documentModified
 
 Document::Document() :
-    m_mainModel(0)
+    m_mainModel(0),
+    m_autoAlignment(false)
 {
     connect(this, SIGNAL(modelAboutToBeDeleted(Model *)),
             TransformFactory::getInstance(),
@@ -370,6 +371,8 @@
 
     m_models[model] = rec;
 
+    if (m_autoAlignment) alignModel(model);
+
     emit modelAdded(model);
 }