Mercurial > hg > svgui
diff view/Pane.cpp @ 290:3101c68a00c1
* Restore Scale setting which had mistakenly disappeared from spectrum
* Some tweaks to spectrum peaks
* Make spectrum default to 4096/75%... or is that overdoing it?
* Show harmonic cursor even during playback if in measure mode and mouse in
relevant pane
* Avoid crash when trying to measure a non-layer
* Various adjustments to some icons to make them look better in white-on-black
schemes
author | Chris Cannam |
---|---|
date | Fri, 13 Jul 2007 15:54:17 +0000 |
parents | cd2492c5fe45 |
children | 919740b20cc9 |
line wrap: on
line diff
--- a/view/Pane.cpp Fri Jul 13 13:19:15 2007 +0000 +++ b/view/Pane.cpp Fri Jul 13 15:54:17 2007 +0000 @@ -61,7 +61,8 @@ m_vpan(0), m_hthumb(0), m_vthumb(0), - m_reset(0) + m_reset(0), + m_mouseInWidget(false) { setObjectName("Pane"); setMouseTracking(true); @@ -380,7 +381,8 @@ ViewManager::ToolMode toolMode = m_manager->getToolMode(); if (m_manager && - !m_manager->isPlaying() && +// !m_manager->isPlaying() && + m_mouseInWidget && toolMode == ViewManager::MeasureMode) { for (LayerList::iterator vi = m_layers.end(); vi != m_layers.begin(); ) { @@ -1360,8 +1362,10 @@ if (m_measureCursor2) setCursor(*m_measureCursor2); Layer *layer = getTopLayer(); - if (layer) layer->measureDrag(this, e); - if (layer->hasTimeXAxis()) edgeScrollMaybe(e->x()); + if (layer) { + layer->measureDrag(this, e); + if (layer->hasTimeXAxis()) edgeScrollMaybe(e->x()); + } update(); } @@ -1676,8 +1680,15 @@ } void +Pane::enterEvent(QEvent *) +{ + m_mouseInWidget = true; +} + +void Pane::leaveEvent(QEvent *) { + m_mouseInWidget = false; bool previouslyIdentifying = m_identifyFeatures; m_identifyFeatures = false; if (previouslyIdentifying) update();