Improve user interface for axis linking

Several adjustments to UI as discussed with Håkon and Alireza.

* add link/unlink command to right-click menu of axis
* select curve in project tree when clicking on legend item
* make sure internal legend is always visible when toggling plot
* fix issue when using sub plot as data source for axis range
This commit is contained in:
Magne Sjaastad
2022-09-15 08:19:41 +02:00
parent 2e5626941d
commit d1a8de0aa8
18 changed files with 365 additions and 31 deletions
@@ -1486,7 +1486,13 @@ void RiuQwtPlotWidget::onLegendClicked( const QVariant& itemInfo, int index )
if ( !itemInfo.canConvert<QwtPlotItem*>() ) return;
QwtPlotItem* plotItem = qvariant_cast<QwtPlotItem*>( itemInfo );
if ( plotItem ) highlightPlotItem( plotItem );
if ( plotItem )
{
highlightPlotItem( plotItem );
auto wrappedPlotItem = std::make_shared<RiuQwtPlotItem>( plotItem );
emit plotItemSelected( wrappedPlotItem, false, -1 );
}
}
//--------------------------------------------------------------------------------------------------