#10209 Plot: fix html axis title

Qwt uses Qt::mightBeRichText to determine if the axis title is rich text or not.
Qt::mightBeRichText is a simple heuristic which checks whether there is something
that looks like a tag before the first line break. See:
https://doc.qt.io/qt-6/qt-sub-qtgui.html#mightBeRichText

Fixed bug by using html br tag to have at least some html before breaking the line.

Fixes #10209.
This commit is contained in:
Kristian Bendiksen 2023-05-16 10:29:24 +02:00
parent 5b5a302f21
commit 6b333c1dd9

View File

@ -310,7 +310,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
{
assembledYAxisText += QString::fromStdString( quantIt );
insertLineShift ? ( assembledYAxisText += "\n" ) : ( assembledYAxisText += " " );
insertLineShift ? ( assembledYAxisText += "<br>" ) : ( assembledYAxisText += " " );
}
if ( m_axisProperties->showUnitText() )