comparison framework/MainWindowBase.cpp @ 142:8b31cdd7e005

* Fix for session loading from RDF
author Chris Cannam
date Tue, 25 Nov 2008 10:04:37 +0000
parents 9a8c73ffdce0
children 9ef382913c17
comparison
equal deleted inserted replaced
141:9a8c73ffdce0 142:8b31cdd7e005
1462 closeSession(); 1462 closeSession();
1463 createDocument(); 1463 createDocument();
1464 1464
1465 m_viewManager->clearSelections(); 1465 m_viewManager->clearSelections();
1466 1466
1467 m_document->setMainModel(newModel);
1468
1469 AddPaneCommand *command = new AddPaneCommand(this); 1467 AddPaneCommand *command = new AddPaneCommand(this);
1470 CommandHistory::getInstance()->addCommand(command); 1468 CommandHistory::getInstance()->addCommand(command);
1471 1469
1472 Pane *pane = command->getPane(); 1470 Pane *pane = command->getPane();
1473 1471
1474 if (m_timeRulerLayer) { 1472 if (m_timeRulerLayer) {
1475 m_document->addLayerToView(pane, m_timeRulerLayer); 1473 m_document->addLayerToView(pane, m_timeRulerLayer);
1476 } 1474 }
1477 1475
1478 Layer *newLayer = m_document->createImportedLayer(newModel); 1476 Layer *newLayer = m_document->createMainModelLayer(LayerFactory::Waveform);
1479 1477 m_document->addLayerToView(pane, newLayer);
1480 if (newLayer) { 1478
1481 m_document->addLayerToView(pane, newLayer); 1479 m_document->setMainModel(newModel);
1482 }
1483 1480
1484 FileOpenStatus layerStatus = openLayer(source); 1481 FileOpenStatus layerStatus = openLayer(source);
1485 1482
1486 setupMenus(); 1483 setupMenus();
1487 1484