Mercurial > hg > svgui
comparison view/Pane.cpp @ 1052:834e94eb1bca 3.0-integration
Merge from branch "alignment-simple"
author | Chris Cannam |
---|---|
date | Thu, 21 Apr 2016 15:06:05 +0100 |
parents | f2c63ec85901 |
children | ee01a4062747 |
comparison
equal
deleted
inserted
replaced
1050:3691af49291c | 1052:834e94eb1bca |
---|---|
715 } | 715 } |
716 | 716 |
717 void | 717 void |
718 Pane::drawCentreLine(sv_samplerate_t sampleRate, QPainter &paint, bool omitLine) | 718 Pane::drawCentreLine(sv_samplerate_t sampleRate, QPainter &paint, bool omitLine) |
719 { | 719 { |
720 if (omitLine && m_manager->getMainModelSampleRate() == 0) { | |
721 return; | |
722 } | |
723 | |
720 int fontHeight = paint.fontMetrics().height(); | 724 int fontHeight = paint.fontMetrics().height(); |
721 int fontAscent = paint.fontMetrics().ascent(); | 725 int fontAscent = paint.fontMetrics().ascent(); |
722 | 726 |
723 QColor c = QColor(0, 0, 0); | 727 QColor c = QColor(0, 0, 0); |
724 if (!hasLightBackground()) { | 728 if (!hasLightBackground()) { |
1941 m_clickPos, | 1945 m_clickPos, |
1942 e->pos(), | 1946 e->pos(), |
1943 true, // can move horiz | 1947 true, // can move horiz |
1944 canTopLayerMoveVertical(), // can move vert | 1948 canTopLayerMoveVertical(), // can move vert |
1945 canTopLayerMoveVertical() || (m_manager && m_manager->isPlaying()), // resist horiz | 1949 canTopLayerMoveVertical() || (m_manager && m_manager->isPlaying()), // resist horiz |
1946 !(m_manager && m_manager->isPlaying())); // resist vert | 1950 true); // resist vert |
1947 | 1951 |
1948 if (m_dragMode == HorizontalDrag || | 1952 if (m_dragMode == HorizontalDrag || |
1949 m_dragMode == FreeDrag) { | 1953 m_dragMode == FreeDrag) { |
1950 | 1954 |
1951 sv_frame_t frameOff = getFrameForX(e->x()) - getFrameForX(m_clickPos.x()); | 1955 sv_frame_t frameOff = getFrameForX(e->x()) - getFrameForX(m_clickPos.x()); |
2310 // the first wheel event -- discard those entirely | 2314 // the first wheel event -- discard those entirely |
2311 if (abs(m_pendingWheelAngle) >= 600) { | 2315 if (abs(m_pendingWheelAngle) >= 600) { |
2312 m_pendingWheelAngle = 0; | 2316 m_pendingWheelAngle = 0; |
2313 return; | 2317 return; |
2314 } | 2318 } |
2315 | 2319 |
2316 while (abs(m_pendingWheelAngle) >= 120) { | 2320 while (abs(m_pendingWheelAngle) >= 120) { |
2317 | 2321 |
2318 int sign = (m_pendingWheelAngle < 0 ? -1 : 1); | 2322 int sign = (m_pendingWheelAngle < 0 ? -1 : 1); |
2319 | 2323 |
2320 if (horizontal) { | 2324 if (horizontal) { |