Mercurial > hg > svgui
comparison view/Overview.cpp @ 1486:ac0a8addabcf
Merge from branch by-id
author | Chris Cannam |
---|---|
date | Wed, 17 Jul 2019 14:25:16 +0100 |
parents | e540aa5d89cd |
children | a0b2f3b4dd2f |
comparison
equal
deleted
inserted
replaced
1468:de41a11cabc2 | 1486:ac0a8addabcf |
---|---|
40 if (light) m_boxColour = Qt::darkGray; | 40 if (light) m_boxColour = Qt::darkGray; |
41 else m_boxColour = Qt::lightGray; | 41 else m_boxColour = Qt::lightGray; |
42 } | 42 } |
43 | 43 |
44 void | 44 void |
45 Overview::modelChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame) | 45 Overview::modelChangedWithin(ModelId modelId, sv_frame_t startFrame, sv_frame_t endFrame) |
46 { | 46 { |
47 using namespace std::rel_ops; | 47 using namespace std::rel_ops; |
48 | 48 |
49 bool zoomChanged = false; | 49 bool zoomChanged = false; |
50 | 50 |
58 | 58 |
59 if (!zoomChanged) { | 59 if (!zoomChanged) { |
60 if (m_modelTestTime.elapsed() < 1000) { | 60 if (m_modelTestTime.elapsed() < 1000) { |
61 for (LayerList::const_iterator i = m_layerStack.begin(); | 61 for (LayerList::const_iterator i = m_layerStack.begin(); |
62 i != m_layerStack.end(); ++i) { | 62 i != m_layerStack.end(); ++i) { |
63 if ((*i)->getModel() && | 63 auto model = ModelById::get((*i)->getModel()); |
64 (!(*i)->getModel()->isOK() || | 64 if (model && (!model->isOK() || !model->isReady())) { |
65 !(*i)->getModel()->isReady())) { | |
66 return; | 65 return; |
67 } | 66 } |
68 } | 67 } |
69 } else { | 68 } else { |
70 m_modelTestTime.restart(); | 69 m_modelTestTime.restart(); |
71 } | 70 } |
72 } | 71 } |
73 | 72 |
74 View::modelChangedWithin(startFrame, endFrame); | 73 View::modelChangedWithin(modelId, startFrame, endFrame); |
75 } | 74 } |
76 | 75 |
77 void | 76 void |
78 Overview::modelReplaced() | 77 Overview::modelReplaced() |
79 { | 78 { |