Mercurial > hg > svgui
diff widgets/PropertyStack.cpp @ 47:2e2ad8510e52
* Fix a crash in PortAudio output for mono data
* Don't construct a chromagram in TonalChangeDetect plugin ctor
* Update layer show/hide/dormancy for multi-view-capable layers -- the
dormancy concept doesn't really work with these constraints any more
author | Chris Cannam |
---|---|
date | Fri, 03 Mar 2006 17:52:21 +0000 |
parents | c28ebb4ba4de |
children | f2fe98a7c57e |
line wrap: on
line diff
--- a/widgets/PropertyStack.cpp Fri Mar 03 17:23:27 2006 +0000 +++ b/widgets/PropertyStack.cpp Fri Mar 03 17:52:21 2006 +0000 @@ -11,6 +11,7 @@ #include "PropertyBox.h" #include "base/PropertyContainer.h" #include "base/View.h" +#include "base/Layer.h" #include <QIcon> #include <QTabWidget> @@ -70,6 +71,8 @@ PropertyBox *box = new PropertyBox(container); + connect(box, SIGNAL(showLayer(bool)), this, SLOT(showLayer(bool))); + QIcon icon(QString(":/icons/%1.png").arg(iconName)); if (icon.isNull()) { addTab(box, name); @@ -138,6 +141,22 @@ } void +PropertyStack::showLayer(bool show) +{ + QObject *obj = sender(); + + for (unsigned int i = 0; i < m_boxes.size(); ++i) { + if (obj == m_boxes[i]) { + Layer *layer = dynamic_cast<Layer *>(m_boxes[i]->getContainer()); + if (layer) { + layer->showLayer(m_client, show); + return; + } + } + } +} + +void PropertyStack::selectedContainerChanged(int n) { if (n >= int(m_boxes.size())) return;