mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve annotations to work in both vertical and horizontal plots (#9154)
* Move enums to RiaPlotDefines.h * Add support for formation names shading in horizontal plots * Refactor line property code * modernize code
This commit is contained in:
@@ -149,12 +149,11 @@ void RiuSummaryQwtPlot::useTimeBasedTimeAxis()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::updateAnnotationObjects( RimPlotAxisPropertiesInterface* axisProperties )
|
||||
{
|
||||
RiuPlotAnnotationTool::Orientation orientation = RiuPlotAnnotationTool::Orientation::HORIZONTAL;
|
||||
RiaDefines::Orientation orientation = RiaDefines::Orientation::HORIZONTAL;
|
||||
if ( axisProperties->plotAxisType().axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
|
||||
{
|
||||
orientation = RiuPlotAnnotationTool::Orientation::VERTICAL;
|
||||
orientation = RiaDefines::Orientation::VERTICAL;
|
||||
}
|
||||
m_annotationTool->detachAllAnnotations( orientation );
|
||||
|
||||
for ( auto annotation : axisProperties->annotations() )
|
||||
{
|
||||
@@ -221,3 +220,11 @@ RiuPlotWidget* RiuSummaryQwtPlot::plotWidget() const
|
||||
{
|
||||
return m_plotWidget;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::clearAnnotationObjects()
|
||||
{
|
||||
m_annotationTool->detachAllAnnotations();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user