diff options
author | Robert Jonsson <spamatica@gmail.com> | 2006-09-02 20:27:13 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2006-09-02 20:27:13 +0000 |
commit | 75fc444e08d60e24e81c33f3550e8e75d1ce25a9 (patch) | |
tree | c9711cebb286c7c4c573c9e16c137e98a7d49347 | |
parent | d7e887c06328cb708bd28d598b92fcc5d2806bd8 (diff) |
some plugin automation fixes
-rw-r--r-- | muse/muse/audiotrack.cpp | 6 | ||||
-rw-r--r-- | muse/muse/ctrl/ctrldialog.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/muse/muse/audiotrack.cpp b/muse/muse/audiotrack.cpp index 067d5efe..76416855 100644 --- a/muse/muse/audiotrack.cpp +++ b/muse/muse/audiotrack.cpp @@ -101,13 +101,14 @@ void AudioTrack::addPlugin(PluginI* plugin, int idx) int id = (idx + 1) * 0x1000 + i; removeController(id); } + _efxPipe->removeAt(idx); } } if (idx == -1) idx = _efxPipe->size(); - efxPipe()->insert(idx, plugin); if (plugin) { + efxPipe()->insert(idx, plugin); int ncontroller = plugin->plugin()->parameter(); for (int i = 0; i < ncontroller; ++i) { int id = (idx + 1) * 0x1000 + i; @@ -115,6 +116,7 @@ void AudioTrack::addPlugin(PluginI* plugin, int idx) float min, max; plugin->range(i, &min, &max); Ctrl* cl = getController(id); + //printf("Plugin name: %s id:%d\n",name.toLatin1().data(), id); if (cl == 0) { cl = new Ctrl(id, name); cl->setRange(min, max); @@ -123,6 +125,8 @@ void AudioTrack::addPlugin(PluginI* plugin, int idx) cl->setCurVal(defaultValue); addController(cl); } + cl->setRange(min, max); + cl->setName(name); plugin->setParam(i, cl->schedVal().f); plugin->setControllerList(cl); } diff --git a/muse/muse/ctrl/ctrldialog.cpp b/muse/muse/ctrl/ctrldialog.cpp index c94767bd..25fab300 100644 --- a/muse/muse/ctrl/ctrldialog.cpp +++ b/muse/muse/ctrl/ctrldialog.cpp @@ -36,6 +36,8 @@ CtrlDialog::CtrlDialog(Track* track, int currentId, QWidget* parent) QTreeWidgetItem* header = tw->headerItem(); header->setTextAlignment(0, Qt::AlignLeft); header->setTextAlignment(1, Qt::AlignHCenter); + + /* COMMENT: setSizeHint does not work in qt4.1, Scheduled for 4.2.0 */ header->setSizeHint(1, QSize(30, 20)); header->setToolTip(0, tr("controller name")); header->setToolTip(1, tr("flag if controller contains data")); |