]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
INT PAL 0052660: Plot2D Viewer: Plot2d_Curve can't be selected
authorimn <imn@opencascade.com>
Fri, 17 Apr 2015 07:57:16 +0000 (10:57 +0300)
committerimn <imn@opencascade.com>
Fri, 17 Apr 2015 07:57:16 +0000 (10:57 +0300)
src/SPlot2d/SPlot2d_ViewModel.cxx

index 620f74e914d312cdec67bf04bf7e42ead4f64ef5..02b8e400908727987e3e15eb4be6b80ce3f4a44a 100644 (file)
@@ -407,6 +407,13 @@ void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index )
 
   QwtPlotItem* plotItem = aViewFrame->getPlot()->infoToItem( itemInfo );
 
+  CurveDict aCurves = aViewFrame->getCurves();
+  for( CurveDict::Iterator it = aCurves.begin(); it != aCurves.end(); ++it )
+  {
+    it.value()->setSelected( plotItem == it.key() );
+    aViewFrame->updateCurve( it.value(), true );
+  }
+
   bool isAnalytical = false;
   AnalyticalCurveList curves = aViewFrame->getAnalyticalCurves();
    foreach ( Plot2d_AnalyticalCurve* curve, curves ) {
@@ -426,7 +433,6 @@ void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index )
   }
 
   Plot2d_Object* anObject = aViewFrame->getPlotObject(plotItem);
-  
   if(anObject) {
     
     // Highlight object in Object Browser