Commits

Pam Ford authored f78e9cec429
Fix plotms axis range bug
No tags

code/casaqt/QwtPlotter/QPCanvas.cc

Modified
637 637 m_canvas.setAutoReplot(false);
638 638 bool changed = false;
639 639
640 640 // set bounds
641 641 if (xFrom != xTo) {
642 642 if ((axisScale(xAxis) >= PlotAxisScale::DATE_MJ_SEC) && (xTo-xFrom)>120.0) {
643 643 setTimeScaleDiv(xAxis, xFrom, xTo); // ticks to even steps/minutes
644 644 } else {
645 645 m_canvas.setAxisScale(QPOptions::axis(xAxis), xFrom, xTo,
646 646 m_canvas.axisStepSize(QPOptions::axis(xAxis)));
647 - m_canvas.updateAxes();
648 647 }
648 + m_canvas.updateAxes();
649 649 changed = true;
650 650 }
651 651
652 652 if(yAxis != xAxis && yFrom != yTo) {
653 653 if (axisScale(yAxis) >= PlotAxisScale::DATE_MJ_SEC && (yTo-yFrom)>120.0) {
654 654 setTimeScaleDiv(yAxis, yFrom, yTo); // ticks to even steps/minutes
655 655 } else {
656 656 m_canvas.setAxisScale(QPOptions::axis(yAxis), yFrom, yTo);
657 657 }
658 + m_canvas.updateAxes();
658 659 changed = true;
659 660 }
660 661
661 662 // update axes ratios if needed
662 663 if(changed && m_axesRatioLocked) {
663 664 double r = 1 / m_axesRatios[axisIndex(xAxis)];
664 665 for(unsigned int i = 0; i < m_axesRatios.size(); i++)
665 666 m_axesRatios[i] *= r;
666 667
667 668 double size = xTo - xFrom;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut