comparison view/Pane.cpp @ 208:8495187c13ce

* Further fixes for Vamp API change, and update to support API versioning * Add plugin, output and parameter descriptions to GUI * Avoid squished panner in heads-up-display on pane when time-value or note layer is on top
author Chris Cannam
date Tue, 27 Feb 2007 12:51:38 +0000
parents 6969f21da18a
children e554ab9a4408
comparison
equal deleted inserted replaced
207:a5b3c9f580c1 208:8495187c13ce
253 253
254 void 254 void
255 Pane::updateVerticalPanner() 255 Pane::updateVerticalPanner()
256 { 256 {
257 if (!m_vpan || !m_manager || !m_manager->getZoomWheelsEnabled()) return; 257 if (!m_vpan || !m_manager || !m_manager->getZoomWheelsEnabled()) return;
258
259 // In principle we should show or hide the panner on the basis of
260 // whether the top layer has adjustable display extents, and we do
261 // that below. However, we have no basis for layout of the panner
262 // if the vertical scroll wheel is not also present. So if we
263 // have no vertical scroll wheel, we should remove the panner as
264 // well. Ideally any layer that implements display extents should
265 // implement vertical zoom steps as well, but they don't all at
266 // the moment.
267
268 Layer *layer = 0;
269 if (getLayerCount() > 0) layer = getLayer(getLayerCount() - 1);
270 int discard;
271 if (layer && layer->getVerticalZoomSteps(discard) == 0) {
272 m_vpan->hide();
273 return;
274 }
258 275
259 float vmin, vmax, dmin, dmax; 276 float vmin, vmax, dmin, dmax;
260 if (getTopLayerDisplayExtents(vmin, vmax, dmin, dmax) && vmax != vmin) { 277 if (getTopLayerDisplayExtents(vmin, vmax, dmin, dmax) && vmax != vmin) {
261 float y0 = (dmin - vmin) / (vmax - vmin); 278 float y0 = (dmin - vmin) / (vmax - vmin);
262 float y1 = (dmax - vmin) / (vmax - vmin); 279 float y1 = (dmax - vmin) / (vmax - vmin);