Changeset - 73a524b77e08
[Not reviewed]
Mehmet ASLAN - 7 years ago 2019-01-26 11:32:06
aaslan-mehmet@hotmail.com
zoomer index out of bound for channel info fixed
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/plotmanager.cpp
Show inline comments
 
@@ -379,24 +379,34 @@ void PlotManager::_addCurve(QwtPlotCurve
 
            dispChannels = _stream->allChannels();
 
        }
 
        plot->setDispChannels(dispChannels);
 
    }
 

	
 
    // show the curve
 
    curve->attach(plot);
 
    plot->replot();
 
}
 

	
 
void PlotManager::removeCurves(unsigned number)
 
{
 
    if (_stream != nullptr)     // not displaying snapshot
 
    {
 
        if (! isMulti)
 
        {
 
            QVector<const StreamChannel*> dispChannels;
 
            dispChannels = _stream->allChannels();
 
            plotWidgets[0]->setDispChannels(dispChannels);
 
        }
 
    }
 

	
 
    for (unsigned i = 0; i < number; i++)
 
    {
 
        if (!curves.isEmpty())
 
        {
 
            delete curves.takeLast();
 
            if (isMulti) // delete corresponding widget as well
 
            {
 
                delete plotWidgets.takeLast();
 
            }
 
        }
 
    }
 
}
0 comments (0 inline, 0 general)