#9093 MultiPlot: improve axis alignment by resizing scales

This commit is contained in:
Kristian Bendiksen
2022-08-10 13:52:30 +02:00
parent f8e19e68d2
commit 71d18b9e76
4 changed files with 116 additions and 10 deletions

View File

@@ -73,6 +73,8 @@ void RiuSummaryMultiPlotPage::reinsertPlotWidgets()
QList<QPointer<RiuQwtPlotLegend>> legends = this->legendsForVisiblePlots();
QList<QPointer<RiuPlotWidget>> plotWidgets = this->visiblePlotWidgets();
m_visibleIndexToPositionMapping.clear();
int visibleIndex = 0;
int phIndex = 0;
@@ -90,6 +92,8 @@ void RiuSummaryMultiPlotPage::reinsertPlotWidgets()
continue;
}
m_visibleIndexToPositionMapping[visibleIndex] = std::make_pair( row, col );
auto plotWidget = plotWidgets[visibleIndex];
int expectedColSpan = plotWidget->colSpan();
int colSpan = std::min( expectedColSpan, cols - col );