QwtPlotItem* plotItem = aViewFrame->getPlot()->infoToItem( itemInfo );
+ bool isCurveSelected = false;
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 );
+ if(plotItem == it.key()) {
+ isCurveSelected = true;
+ it.value()->setSelected(true);
+ } else {
+ it.value()->setSelected(false);
+ }
}
- bool isAnalytical = false;
AnalyticalCurveList curves = aViewFrame->getAnalyticalCurves();
foreach ( Plot2d_AnalyticalCurve* curve, curves ) {
if(plotItem == curve->plotItem()) {
- isAnalytical = true;
+ isCurveSelected = true;
curve->setSelected(true);
} else {
curve->setSelected(false);
}
}
- if(isAnalytical) {
+ if(isCurveSelected) {
+ for( CurveDict::Iterator it = aCurves.begin(); it != aCurves.end(); ++it )
+ aViewFrame->updateCurve( it.value() );
+
myDeselectAnalytical = false;
emit clearSelected();
aViewFrame->updateAnalyticalCurves();