Mercurial > hg > svcore
comparison base/PlayParameterRepository.cpp @ 284:41d64b873d87
* continue to pick "new" colours for coloured layers even when all colours
have been used at least once, rather than sticking on the last one
* some messing about with application palette settings
* when replacing an audio file, retain the previous playback settings for
any layers that depended on the old file
* re-check plugin program setting when a parameter changes -- so a plugin
can decide to reset the program if the parameters no longer match those
for the current program
* fix failure to update check-boxes for toggled plugin parameters when their
parameters are changed by program changes
author | Chris Cannam |
---|---|
date | Thu, 09 Aug 2007 14:40:03 +0000 |
parents | 4b2ea82fd0ed |
children | 1dc99b430d2a |
comparison
equal
deleted
inserted
replaced
283:7336fe3a7caa | 284:41d64b873d87 |
---|---|
83 { | 83 { |
84 delete m_playParameters[model]; | 84 delete m_playParameters[model]; |
85 m_playParameters.erase(model); | 85 m_playParameters.erase(model); |
86 } | 86 } |
87 | 87 |
88 void | |
89 PlayParameterRepository::copyParameters(const Model *from, const Model *to) | |
90 { | |
91 if (!getPlayParameters(from)) { | |
92 std::cerr << "ERROR: PlayParameterRepository::copyParameters: source model unknown" << std::endl; | |
93 return; | |
94 } | |
95 if (!getPlayParameters(to)) { | |
96 std::cerr << "WARNING: PlayParameterRepository::copyParameters: target model unknown, adding it now" << std::endl; | |
97 addModel(to); | |
98 } | |
99 getPlayParameters(to)->copyFrom(getPlayParameters(from)); | |
100 } | |
101 | |
88 PlayParameters * | 102 PlayParameters * |
89 PlayParameterRepository::getPlayParameters(const Model *model) const | 103 PlayParameterRepository::getPlayParameters(const Model *model) |
90 { | 104 { |
91 if (m_playParameters.find(model) == m_playParameters.end()) return 0; | 105 if (m_playParameters.find(model) == m_playParameters.end()) return 0; |
92 return m_playParameters.find(model)->second; | 106 return m_playParameters.find(model)->second; |
93 } | 107 } |
94 | 108 |