--- qsampler/trunk/src/qsamplerChannelStrip.cpp 2007/11/23 10:51:37 1514 +++ qsampler/trunk/src/qsamplerChannelStrip.cpp 2007/12/06 09:35:33 1558 @@ -47,10 +47,13 @@ namespace QSampler { +//------------------------------------------------------------------------- +// QSampler::ChannelStrip -- Channel strip form implementation. +// + // Channel strip activation/selection. ChannelStrip *ChannelStrip::g_pSelectedStrip = NULL; - ChannelStrip::ChannelStrip ( QWidget* pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags) { @@ -63,7 +66,6 @@ // Try to restore normal window positioning. adjustSize(); - setSelected(false); QObject::connect(m_ui.ChannelSetupPushButton, SIGNAL(clicked()), @@ -83,11 +85,15 @@ QObject::connect(m_ui.ChannelEditPushButton, SIGNAL(clicked()), SLOT(channelEdit())); + + setSelected(false); } ChannelStrip::~ChannelStrip (void) { + setSelected(false); + // Destroy existing channel descriptor. if (m_pChannel) delete m_pChannel; @@ -110,7 +116,7 @@ while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) { - bAccept = qsamplerChannel::isInstrumentFile(sFilename); + bAccept = Channel::isInstrumentFile(sFilename); break; } } @@ -151,7 +157,7 @@ // Channel strip setup formal initializer. -void ChannelStrip::setup ( qsamplerChannel *pChannel ) +void ChannelStrip::setup ( Channel *pChannel ) { // Destroy any previous channel descriptor; // (remember that once setup we own it!) @@ -171,7 +177,7 @@ // Channel secriptor accessor. -qsamplerChannel *ChannelStrip::channel (void) const +Channel *ChannelStrip::channel (void) const { return m_pChannel; } @@ -309,10 +315,10 @@ if (m_pChannel->instrumentName().isEmpty()) { if (m_pChannel->instrumentStatus() >= 0) { m_ui.InstrumentNameTextLabel->setText( - ' ' + qsamplerChannel::loadingInstrument()); + ' ' + Channel::loadingInstrument()); } else { m_ui.InstrumentNameTextLabel->setText( - ' ' + qsamplerChannel::noInstrumentName()); + ' ' + Channel::noInstrumentName()); } } else { m_ui.InstrumentNameTextLabel->setText( @@ -371,7 +377,7 @@ // Engine name... if (m_pChannel->engineName().isEmpty()) { m_ui.EngineNameTextLabel->setText( - ' ' + qsamplerChannel::noEngineName()); + ' ' + Channel::noEngineName()); } else { m_ui.EngineNameTextLabel->setText( ' ' + m_pChannel->engineName());