# HG changeset patch # User Chris Cannam # Date 1137175507 0 # Node ID 06bba0b79b1c84fc2ecd947135817fe51bccb905 # Parent 634324c6296eecb1774f00432d2e429a48a3125f * Session file save, and the skeleton of session file load. diff -r 634324c6296e -r 06bba0b79b1c layer/LayerFactory.cpp --- a/layer/LayerFactory.cpp Thu Jan 12 17:45:23 2006 +0000 +++ b/layer/LayerFactory.cpp Fri Jan 13 18:05:07 2006 +0000 @@ -195,7 +195,7 @@ std::cerr << "LayerFactory::createLayer: Unknown layer type " << type << std::endl; } else { - setModel(layer, model); + if (model) setModel(layer, model); std::cerr << "LayerFactory::createLayer: Setting object name " << getLayerPresentationName(type).toStdString() << " on " << layer << std::endl; layer->setObjectName(getLayerPresentationName(type)); diff -r 634324c6296e -r 06bba0b79b1c widgets/Pane.cpp --- a/widgets/Pane.cpp Thu Jan 12 17:45:23 2006 +0000 +++ b/widgets/Pane.cpp Fri Jan 13 18:05:07 2006 +0000 @@ -389,7 +389,16 @@ emit paneInteractedWith(); } - + +QString +Pane::toXmlString(QString indent, QString extraAttributes) const +{ + return View::toXmlString + (indent, + QString("type=\"pane\" centreLineVisible=\"%1\" %2") + .arg(m_centreLineVisible).arg(extraAttributes)); +} + #ifdef INCLUDE_MOCFILES #include "Pane.moc.cpp" diff -r 634324c6296e -r 06bba0b79b1c widgets/Pane.h --- a/widgets/Pane.h Thu Jan 12 17:45:23 2006 +0000 +++ b/widgets/Pane.h Fri Jan 13 18:05:07 2006 +0000 @@ -34,6 +34,9 @@ void setCentreLineVisible(bool visible); bool getCentreLineVisible() const { return m_centreLineVisible; } + virtual QString toXmlString(QString indent = "", + QString extraAttributes = "") const; + signals: void paneInteractedWith();