Salome HOME
Merge from branch mpa/qwt6_porting
[modules/gui.git] / src / SPlot2d / SPlot2d_ViewModel.cxx
index a250c04ba990e1e94a786b91d014f7cf24e45031..0f4ed1d7dc3a2867be254d1959b4d2b0b0557659 100644 (file)
@@ -400,11 +400,13 @@ SUIT_ViewWindow* SPlot2d_Viewer::createView( SUIT_Desktop* theDesktop )
   SLOT: called when action "Legend Clicked" is activated.
   override "onLegendClicked" method from Plot2d_ViewModel.
 */
-void SPlot2d_Viewer::onLegendClicked( QwtPlotItem* plotItem )
+void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index )
 {
   Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
   if(aViewFrame == NULL) return;
 
+  QwtPlotItem* plotItem = aViewFrame->getPlot()->infoToItem( itemInfo );
+
   bool isAnalytical = false;
   AnalyticalCurveList curves = aViewFrame->getAnalyticalCurves();
    foreach ( Plot2d_AnalyticalCurve* curve, curves ) {