comparison widgets/Pane.cpp @ 56:fedaf3ffe80a

* Add menu for re-adding existing layers * Fix layer tree window so that it at least approximates correct * Add bundled operations in command history, for use with things like multiple consecutive changes to a parameter value * Disambiguate plugins that happen to have identical descriptions * Add spectral centroid plugin (could use some parameters!) * Some other fixes
author Chris Cannam
date Fri, 17 Mar 2006 17:38:28 +0000
parents 128ebfeeebee
children 01ab51f72e84
comparison
equal deleted inserted replaced
55:128ebfeeebee 56:fedaf3ffe80a
321 std::vector<QString> texts; 321 std::vector<QString> texts;
322 int maxTextWidth = 0; 322 int maxTextWidth = 0;
323 323
324 for (LayerList::iterator i = m_layers.begin(); i != m_layers.end(); ++i) { 324 for (LayerList::iterator i = m_layers.begin(); i != m_layers.end(); ++i) {
325 325
326 QString layerName = (*i)->objectName(); 326 QString text = (*i)->getLayerPresentationName();
327 QString modelName;
328 if ((*i)->getModel()) modelName = (*i)->getModel()->objectName();
329
330 QString text;
331 if (modelName != "") {
332 text = QString("%1: %2").arg(modelName).arg(layerName);
333 } else {
334 text = layerName;
335 }
336
337 texts.push_back(text); 327 texts.push_back(text);
338 int tw = paint.fontMetrics().width(text); 328 int tw = paint.fontMetrics().width(text);
339 if (tw > maxTextWidth) maxTextWidth = tw; 329 if (tw > maxTextWidth) maxTextWidth = tw;
340 } 330 }
341 331