Mercurial > hg > svgui
diff layer/LayerFactory.cpp @ 327:29fcf125f98b
* Pass StorageAdviser::Criteria into FFTModel constructor etc
author | Chris Cannam |
---|---|
date | Sun, 11 Nov 2007 20:31:12 +0000 |
parents | 4f4f38a11cd2 |
children | 4a542ba875c2 64e84e5efb76 |
line wrap: on
line diff
--- a/layer/LayerFactory.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/layer/LayerFactory.cpp Sun Nov 11 20:31:12 2007 +0000 @@ -418,8 +418,8 @@ std::cerr << "LayerFactory::createLayer: Unknown layer type " << type << std::endl; } else { -// std::cerr << "LayerFactory::createLayer: Setting object name " -// << getLayerPresentationName(type).toStdString() << " on " << layer << std::endl; + std::cerr << "LayerFactory::createLayer: Setting object name " + << getLayerPresentationName(type).toStdString() << " on " << layer << std::endl; layer->setObjectName(getLayerPresentationName(type)); setLayerDefaultProperties(type, layer); } @@ -430,11 +430,15 @@ void LayerFactory::setLayerDefaultProperties(LayerType type, Layer *layer) { + std::cerr << "LayerFactory::setLayerDefaultProperties: type " << type << " (name \"" << getLayerTypeName(type).toStdString() << "\"" << std::endl; + QSettings settings; settings.beginGroup("LayerDefaults"); QString defaults = settings.value(getLayerTypeName(type), "").toString(); if (defaults == "") return; + std::cerr << "defaults=\"" << defaults.toStdString() << "\"" << std::endl; + QString xml = layer->toXmlString(); QDomDocument docOld, docNew; @@ -449,6 +453,9 @@ for (unsigned int i = 0; i < attrNodes.length(); ++i) { QDomAttr attr = attrNodes.item(i).toAttr(); if (attr.isNull()) continue; + std::cerr << "append \"" << attr.name().toStdString() + << "\" -> \"" << attr.value().toStdString() << "\"" + << std::endl; attrs.append(attr.name(), "", "", attr.value()); } @@ -458,6 +465,9 @@ QDomAttr attr = attrNodes.item(i).toAttr(); if (attr.isNull()) continue; if (attrs.value(attr.name()) == "") { + std::cerr << "append \"" << attr.name().toStdString() + << "\" -> \"" << attr.value().toStdString() << "\"" + << std::endl; attrs.append(attr.name(), "", "", attr.value()); } }