Mercurial > hg > svgui
comparison view/Pane.cpp @ 1467:f9110e5afca1
Don't try to draw scale from a dormant layer!
author | Chris Cannam |
---|---|
date | Thu, 13 Jun 2019 15:05:25 +0100 |
parents | ce5f80a7c697 |
children | de41a11cabc2 |
comparison
equal
deleted
inserted
replaced
1466:0ecfaa463c1b | 1467:f9110e5afca1 |
---|---|
517 | 517 |
518 double min, max; | 518 double min, max; |
519 bool log; | 519 bool log; |
520 QString unit; | 520 QString unit; |
521 | 521 |
522 // If the top layer has no scale and reports no display | 522 // If the top layer has no scale and reports no display extents, |
523 // extents, but does report a unit, then the scale should be | 523 // but does report a unit, then the scale should be drawn from any |
524 // drawn from any underlying layer with a scale and that unit. | 524 // (visible) underlying layer with a scale and that unit. If the |
525 // If the top layer has no scale and no value extents at all, | 525 // top layer has no scale and no value extents at all, then the |
526 // then the scale should be drawn from any underlying layer | 526 // scale should be drawn from any (visible) underlying layer with |
527 // with a scale regardless of unit. | 527 // a scale regardless of unit. |
528 | 528 |
529 int sw = topLayer->getVerticalScaleWidth | 529 int sw = topLayer->getVerticalScaleWidth |
530 (this, m_manager->shouldShowVerticalColourScale(), paint); | 530 (this, m_manager->shouldShowVerticalColourScale(), paint); |
531 | 531 |
532 if (sw > 0) { | 532 if (sw > 0) { |
546 vi != m_layerStack.begin(); ) { | 546 vi != m_layerStack.begin(); ) { |
547 | 547 |
548 --vi; | 548 --vi; |
549 | 549 |
550 if ((*vi) == topLayer) continue; | 550 if ((*vi) == topLayer) continue; |
551 if ((*vi)->isLayerDormant(this)) continue; | |
551 | 552 |
552 sw = (*vi)->getVerticalScaleWidth | 553 sw = (*vi)->getVerticalScaleWidth |
553 (this, m_manager->shouldShowVerticalColourScale(), paint); | 554 (this, m_manager->shouldShowVerticalColourScale(), paint); |
554 | 555 |
555 if (sw > 0) { | 556 if (sw > 0) { |
566 vi != m_layerStack.begin(); ) { | 567 vi != m_layerStack.begin(); ) { |
567 | 568 |
568 --vi; | 569 --vi; |
569 | 570 |
570 if ((*vi) == topLayer) continue; | 571 if ((*vi) == topLayer) continue; |
572 if ((*vi)->isLayerDormant(this)) continue; | |
571 | 573 |
572 if ((*vi)->getDisplayExtents(min, max)) { | 574 if ((*vi)->getDisplayExtents(min, max)) { |
573 | 575 |
574 // search no further than this: if the | 576 // search no further than this: if the |
575 // scale from this layer isn't suitable, | 577 // scale from this layer isn't suitable, |