Mercurial > hg > svgui
comparison view/Overview.cpp @ 585:f4960f8ce798 debug-output
Convert many cerrs to DEBUGs
author | Chris Cannam |
---|---|
date | Mon, 16 May 2011 17:19:25 +0100 |
parents | 2ed4e572d0d4 |
children | 4806715f7a19 |
comparison
equal
deleted
inserted
replaced
584:1fe7951a61e8 | 585:f4960f8ce798 |
---|---|
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 // std::cerr << "Overview::paintEvent: width is " << width() << ", centre frame " << m_centreFrame << std::endl; | 133 // DEBUG << "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 // std::cerr << "Overview::paintEvent: Centre frame changed from " | 151 // DEBUG << "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 // std::cerr << " to " << getStartFrame() << std::endl; | 154 // DEBUG << " 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 |