- int division = (int)round(first_minor_division -
- first_major_division * MinorTickSubdivision);
- while(1)
- {
- const double t = t0 + division * minor_tick_period;
- const double x = (t - _view.offset()) / _view.scale();
-
- if(x >= width())
- break;
-
- if(division % MinorTickSubdivision == 0)
- {
- // Draw a major tick
- QString s;
- QTextStream ts(&s);
- ts << (t / order_decimal) << SIPrefixes[prefix] << "s";
- p.drawText(x, 0, 0, text_height, Qt::AlignCenter | Qt::AlignTop |
- Qt::TextDontClip, s);
- p.drawLine(x, text_height, x, View::RulerHeight);
+ if (event->touchPointStates() & Qt::TouchPointReleased) {
+ _pinch_zoom_active = false;
+
+ if (touchPoint0.state() & Qt::TouchPointReleased) {
+ // Primary touch released
+ _mouse_down_valid = false;
+ } else {
+ // Update the mouse down fields so that continued
+ // dragging with the primary touch will work correctly
+ _mouse_down_point = touchPoint0.pos().toPoint();
+ _mouse_down_offset = _view.offset();
+ _mouse_down_valid = true;