Mercurial > hg > svgui
comparison view/Overview.cpp @ 587:4806715f7a19
Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 15:27:05 +0100 |
parents | f4960f8ce798 |
children | 2c35737cd3f8 |
comparison
equal
deleted
inserted
replaced
586:1ae54a29e59e | 587:4806715f7a19 |
---|---|
128 void | 128 void |
129 Overview::paintEvent(QPaintEvent *e) | 129 Overview::paintEvent(QPaintEvent *e) |
130 { | 130 { |
131 // Recalculate zoom in case the size of the widget has changed. | 131 // Recalculate zoom in case the size of the widget has changed. |
132 | 132 |
133 // DEBUG << "Overview::paintEvent: width is " << width() << ", centre frame " << m_centreFrame << endl; | 133 // SVDEBUG << "Overview::paintEvent: width is " << width() << ", centre frame " << m_centreFrame << endl; |
134 | 134 |
135 size_t startFrame = getModelsStartFrame(); | 135 size_t startFrame = getModelsStartFrame(); |
136 size_t frameCount = getModelsEndFrame() - getModelsStartFrame(); | 136 size_t frameCount = getModelsEndFrame() - getModelsStartFrame(); |
137 int zoomLevel = frameCount / width(); | 137 int zoomLevel = frameCount / width(); |
138 if (zoomLevel < 1) zoomLevel = 1; | 138 if (zoomLevel < 1) zoomLevel = 1; |
146 size_t centreFrame = startFrame + m_zoomLevel * (width() / 2); | 146 size_t centreFrame = startFrame + m_zoomLevel * (width() / 2); |
147 if (centreFrame > (startFrame + getModelsEndFrame())/2) { | 147 if (centreFrame > (startFrame + getModelsEndFrame())/2) { |
148 centreFrame = (startFrame + getModelsEndFrame())/2; | 148 centreFrame = (startFrame + getModelsEndFrame())/2; |
149 } | 149 } |
150 if (centreFrame != m_centreFrame) { | 150 if (centreFrame != m_centreFrame) { |
151 // DEBUG << "Overview::paintEvent: Centre frame changed from " | 151 // SVDEBUG << "Overview::paintEvent: Centre frame changed from " |
152 // << m_centreFrame << " to " << centreFrame << " and thus start frame from " << getStartFrame(); | 152 // << m_centreFrame << " to " << centreFrame << " and thus start frame from " << getStartFrame(); |
153 m_centreFrame = centreFrame; | 153 m_centreFrame = centreFrame; |
154 // DEBUG << " to " << getStartFrame() << endl; | 154 // SVDEBUG << " to " << getStartFrame() << endl; |
155 emit centreFrameChanged(m_centreFrame, false, PlaybackIgnore); | 155 emit centreFrameChanged(m_centreFrame, false, PlaybackIgnore); |
156 } | 156 } |
157 | 157 |
158 View::paintEvent(e); | 158 View::paintEvent(e); |
159 | 159 |