Changeset - aa925fae9c38
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 9 years ago 2017-01-03 05:14:17
hy@ozderya.net
hide/show plot widgets in multi mode
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/plotmanager.cpp
Show inline comments
 
@@ -134,27 +134,31 @@ void PlotManager::onChannelInfoChanged(c
 
        bool visible = topLeft.sibling(ci, ChannelInfoModel::COLUMN_VISIBILITY).data(Qt::CheckStateRole).toBool();
 

	
 
        curves[ci]->setTitle(name);
 
        curves[ci]->setPen(color);
 
        curves[ci]->setVisible(visible);
 
        curves[ci]->setItemAttribute(QwtPlotItem::Legend, visible);
 

	
 
        // replot only updated widgets
 
        if (isMulti)
 
        {
 
            plotWidgets[ci]->updateSymbols(); // required for color change
 
            plotWidgets[ci]->updateLegend(curves[ci]);
 
            plotWidgets[ci]->setVisible(visible);
 
            if (visible)
 
            {
 
            plotWidgets[ci]->replot();
 
        }
 
    }
 
    }
 

	
 
    // replot single widget
 
    if (!isMulti)
 
    {
 
        plotWidgets[0]->updateSymbols();
 
        plotWidgets[0]->updateLegend();
 
        replot();
 
    }
 
}
 

	
 
void PlotManager::setMulti(bool enabled)
 
{
0 comments (0 inline, 0 general)