comparison 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
comparison
equal deleted inserted replaced
46:7fbe1c99d5d8 47:d97a7ed7aa39
36 #include "data/model/AlignmentModel.h" 36 #include "data/model/AlignmentModel.h"
37 37
38 //!!! still need to handle command history, documentRestored/documentModified 38 //!!! still need to handle command history, documentRestored/documentModified
39 39
40 Document::Document() : 40 Document::Document() :
41 m_mainModel(0) 41 m_mainModel(0),
42 m_autoAlignment(false)
42 { 43 {
43 connect(this, SIGNAL(modelAboutToBeDeleted(Model *)), 44 connect(this, SIGNAL(modelAboutToBeDeleted(Model *)),
44 TransformFactory::getInstance(), 45 TransformFactory::getInstance(),
45 SLOT(modelAboutToBeDeleted(Model *))); 46 SLOT(modelAboutToBeDeleted(Model *)));
46 } 47 }
368 rec.transform = ""; 369 rec.transform = "";
369 rec.refcount = 0; 370 rec.refcount = 0;
370 371
371 m_models[model] = rec; 372 m_models[model] = rec;
372 373
374 if (m_autoAlignment) alignModel(model);
375
373 emit modelAdded(model); 376 emit modelAdded(model);
374 } 377 }
375 378
376 Model * 379 Model *
377 Document::addDerivedModel(TransformId transform, 380 Document::addDerivedModel(TransformId transform,