Mercurial > hg > svgui
comparison layer/WaveformLayer.cpp @ 69:6dad2724f3aa
* Ensure plugin parameters for a transform are saved in the .sv file and
restored in case the plugin has to be run again
* Make plugin dialog offer options for mixdown/single-channel use if the
file has more than one channels but the plugin only accepts one
* Fix incorrect samplerate playback for second file loaded if its samplerate
differed from first
* Add Zoom to Fit and Select Visible Range menu options, split out Import
Audio into main model and secondary model options
* Add stubs for cut, copy and paste operations (not implemented yet)
author | Chris Cannam |
---|---|
date | Thu, 30 Mar 2006 13:18:11 +0000 |
parents | 193b569a975f |
children | 72fa239a4880 |
comparison
equal
deleted
inserted
replaced
68:193b569a975f | 69:6dad2724f3aa |
---|---|
54 } | 54 } |
55 | 55 |
56 void | 56 void |
57 WaveformLayer::setModel(const RangeSummarisableTimeValueModel *model) | 57 WaveformLayer::setModel(const RangeSummarisableTimeValueModel *model) |
58 { | 58 { |
59 bool channelsChanged = false; | |
60 if (m_channel == -1) { | |
61 if (!m_model) { | |
62 if (model) { | |
63 channelsChanged = true; | |
64 } | |
65 } else { | |
66 if (model && | |
67 m_model->getChannelCount() != model->getChannelCount()) { | |
68 channelsChanged = true; | |
69 } | |
70 } | |
71 } | |
72 | |
59 m_model = model; | 73 m_model = model; |
60 m_cacheValid = false; | 74 m_cacheValid = false; |
61 if (!m_model || !m_model->isOK()) return; | 75 if (!m_model || !m_model->isOK()) return; |
62 | 76 |
63 connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged())); | 77 connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged())); |
66 | 80 |
67 connect(m_model, SIGNAL(completionChanged()), | 81 connect(m_model, SIGNAL(completionChanged()), |
68 this, SIGNAL(modelCompletionChanged())); | 82 this, SIGNAL(modelCompletionChanged())); |
69 | 83 |
70 emit modelReplaced(); | 84 emit modelReplaced(); |
85 | |
86 if (channelsChanged) emit layerParametersChanged(); | |
71 } | 87 } |
72 | 88 |
73 Layer::PropertyList | 89 Layer::PropertyList |
74 WaveformLayer::getProperties() const | 90 WaveformLayer::getProperties() const |
75 { | 91 { |