mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Working clicking on Tornado Plots
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
|
||||
#include "cafPdmUiComboBoxEditor.h"
|
||||
|
||||
#include "qwt_plot_barchart.h"
|
||||
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <set>
|
||||
@@ -295,6 +297,26 @@ void RimCorrelationPlot::updatePlotTitle()
|
||||
m_plotWidget->setPlotTitleFontSize( isMdiWindow() ? 8 : 10 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCorrelationPlot::onPlotItemSelected( QwtPlotItem* plotItem, bool toggle, int sampleIndex )
|
||||
{
|
||||
QwtPlotBarChart* barChart = dynamic_cast<QwtPlotBarChart*>( plotItem );
|
||||
if ( barChart && !curveDefinitions().empty() )
|
||||
{
|
||||
auto curveDef = curveDefinitions().front();
|
||||
auto barTitle = barChart->title();
|
||||
for ( auto param : ensembleParameters() )
|
||||
{
|
||||
if ( barTitle.text() == param.name )
|
||||
{
|
||||
emit tornadoItemSelected( param, curveDef );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user