mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Highlight the curve belonging to the legend you click on. (#9259)
* Highlight the curve belonging to the legend you click on. * Make sure legend curve order remains the same when changing hilited curve
This commit is contained in:
@@ -189,11 +189,15 @@ void RiuMultiPlotPage::insertPlot( RiuPlotWidget* plotWidget, size_t index )
|
||||
legend->setMaxColumns( legendColumns );
|
||||
legend->horizontalScrollBar()->setVisible( false );
|
||||
legend->verticalScrollBar()->setVisible( false );
|
||||
legend->setDefaultItemMode( QwtLegendData::Clickable );
|
||||
if ( qwtPlotWidget )
|
||||
{
|
||||
legend->connect( qwtPlotWidget->qwtPlot(),
|
||||
SIGNAL( legendDataChanged( const QVariant&, const QList<QwtLegendData>& ) ),
|
||||
SLOT( updateLegend( const QVariant&, const QList<QwtLegendData>& ) ) );
|
||||
qwtPlotWidget->connect( legend,
|
||||
SIGNAL( clicked( const QVariant&, int ) ),
|
||||
SLOT( onLegendClicked( const QVariant&, int ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user