Prevent scrolling/panning while button is down, make sure duration display goes back to normal

This commit is contained in:
Mark Watkins 2014-07-19 22:55:40 +10:00
parent 5e672eb651
commit 8599598607
2 changed files with 3 additions and 1 deletions

View File

@ -1577,6 +1577,7 @@ void gGraphView::keyReleaseEvent(QKeyEvent *event)
m_graphs[m_graph_index]->mouseReleaseEvent(&mevent); m_graphs[m_graph_index]->mouseReleaseEvent(&mevent);
m_metaselect = false; m_metaselect = false;
timedRedraw(50);
} }
#ifdef BROKEN_OPENGL_BUILD #ifdef BROKEN_OPENGL_BUILD
QWidget::keyReleaseEvent(event); QWidget::keyReleaseEvent(event);
@ -1677,6 +1678,7 @@ void gGraphView::wheelEvent(QWheelEvent *event)
{ {
// Hmm.. I could optionalize this to change mousewheel behaviour without affecting the scrollbar now.. // Hmm.. I could optionalize this to change mousewheel behaviour without affecting the scrollbar now..
if (m_button_down) return;
if ((event->modifiers() & Qt::ControlModifier)) { if ((event->modifiers() & Qt::ControlModifier)) {
int x = event->x(); int x = event->x();
int y = event->y(); int y = event->y();

View File

@ -287,7 +287,7 @@ void gLineOverlaySummary::paint(QPainter &painter, gGraph &w, const QRegion &reg
QString a; QString a;
if (w.graphView()->selectionInProgress()) { if (w.graphView()->selectionInProgress() || w.graphView()->metaSelect()) {
a = QObject::tr("Duration")+": "+w.selDurString(); a = QObject::tr("Duration")+": "+w.selDurString();
} else { } else {