Mercurial > hg > sonic-visualiser
comparison document/Document.cpp @ 137:006c90387f40
* Fix many compile warnings, remove some debug output
author | Chris Cannam |
---|---|
date | Mon, 30 Apr 2007 13:36:23 +0000 |
parents | b4110b17bca8 |
children | 107ca17594c8 |
comparison
equal
deleted
inserted
replaced
136:37c26877ca5f | 137:006c90387f40 |
---|---|
238 for (LayerSet::iterator i = m_layers.begin(); i != m_layers.end(); ++i) { | 238 for (LayerSet::iterator i = m_layers.begin(); i != m_layers.end(); ++i) { |
239 | 239 |
240 Layer *layer = *i; | 240 Layer *layer = *i; |
241 Model *model = layer->getModel(); | 241 Model *model = layer->getModel(); |
242 | 242 |
243 std::cerr << "Document::setMainModel: inspecting model " | 243 // std::cerr << "Document::setMainModel: inspecting model " |
244 << (model ? model->objectName().toStdString() : "(null)") << " in layer " | 244 // << (model ? model->objectName().toStdString() : "(null)") << " in layer " |
245 << layer->objectName().toStdString() << std::endl; | 245 // << layer->objectName().toStdString() << std::endl; |
246 | 246 |
247 if (model == oldMainModel) { | 247 if (model == oldMainModel) { |
248 std::cerr << "... it uses the old main model, replacing" << std::endl; | 248 // std::cerr << "... it uses the old main model, replacing" << std::endl; |
249 LayerFactory::getInstance()->setModel(layer, m_mainModel); | 249 LayerFactory::getInstance()->setModel(layer, m_mainModel); |
250 continue; | 250 continue; |
251 } | 251 } |
252 | 252 |
253 if (m_models.find(model) == m_models.end()) { | 253 if (m_models.find(model) == m_models.end()) { |
258 continue; | 258 continue; |
259 } | 259 } |
260 | 260 |
261 if (m_models[model].source == oldMainModel) { | 261 if (m_models[model].source == oldMainModel) { |
262 | 262 |
263 std::cerr << "... it uses a model derived from the old main model, regenerating" << std::endl; | 263 // std::cerr << "... it uses a model derived from the old main model, regenerating" << std::endl; |
264 | 264 |
265 // This model was derived from the previous main | 265 // This model was derived from the previous main |
266 // model: regenerate it. | 266 // model: regenerate it. |
267 | 267 |
268 TransformId transform = m_models[model].transform; | 268 TransformId transform = m_models[model].transform; |
531 void | 531 void |
532 Document::addLayerToView(View *view, Layer *layer) | 532 Document::addLayerToView(View *view, Layer *layer) |
533 { | 533 { |
534 Model *model = layer->getModel(); | 534 Model *model = layer->getModel(); |
535 if (!model) { | 535 if (!model) { |
536 std::cerr << "Document::addLayerToView: Layer (\"" | 536 // std::cerr << "Document::addLayerToView: Layer (\"" |
537 << layer->objectName().toStdString() | 537 // << layer->objectName().toStdString() |
538 << "\") with no model being added to view: " | 538 // << "\") with no model being added to view: " |
539 << "normally you want to set the model first" << std::endl; | 539 // << "normally you want to set the model first" << std::endl; |
540 } else { | 540 } else { |
541 if (model != m_mainModel && | 541 if (model != m_mainModel && |
542 m_models.find(model) == m_models.end()) { | 542 m_models.find(model) == m_models.end()) { |
543 std::cerr << "ERROR: Document::addLayerToView: Layer " << layer | 543 std::cerr << "ERROR: Document::addLayerToView: Layer " << layer |
544 << " has unregistered model " << model | 544 << " has unregistered model " << model |