comparison data/model/EditableDenseThreeDimensionalModel.cpp @ 333:1afaf98dbf11

* Factor out uses of "Sonic Visualiser" in "common" code to applicationName() * Add ability to show work title + artist in top-left of pane (thinking of Vect but may be useful in SV in future) * A few other generalisations useful for Vect
author Chris Cannam
date Fri, 09 Nov 2007 17:46:58 +0000
parents 7a4bd2c8585c
children 7aa1de571880
comparison
equal deleted inserted replaced
332:13e5870040e6 333:1afaf98dbf11
242 m_binNames = names; 242 m_binNames = names;
243 emit modelChanged(); 243 emit modelChanged();
244 } 244 }
245 245
246 void 246 void
247 EditableDenseThreeDimensionalModel::setCompletion(int completion) 247 EditableDenseThreeDimensionalModel::setCompletion(int completion, bool update)
248 { 248 {
249 if (m_completion != completion) { 249 if (m_completion != completion) {
250 m_completion = completion; 250 m_completion = completion;
251 251
252 if (completion == 100) { 252 if (completion == 100) {
254 m_notifyOnAdd = true; // henceforth 254 m_notifyOnAdd = true; // henceforth
255 emit modelChanged(); 255 emit modelChanged();
256 256
257 } else if (!m_notifyOnAdd) { 257 } else if (!m_notifyOnAdd) {
258 258
259 if (m_sinceLastNotifyMin >= 0 && 259 if (update &&
260 m_sinceLastNotifyMin >= 0 &&
260 m_sinceLastNotifyMax >= 0) { 261 m_sinceLastNotifyMax >= 0) {
261 emit modelChanged(m_sinceLastNotifyMin, 262 emit modelChanged(m_sinceLastNotifyMin,
262 m_sinceLastNotifyMax + m_resolution); 263 m_sinceLastNotifyMax + m_resolution);
263 m_sinceLastNotifyMin = m_sinceLastNotifyMax = -1; 264 m_sinceLastNotifyMin = m_sinceLastNotifyMax = -1;
264 } else { 265 } else {