/*
Copyright © 2017 Hasan Yavuz Özderya
Copyright © 2018 Hasan Yavuz Özderya
This file is part of serialplot.
serialplot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
serialplot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -196,26 +196,30 @@ void PlotManager::setMulti(bool enabled)
else
{
// add a single widget
auto plot = addPlotWidget();
// attach all curves
for (auto curve : curves)
curve->attach(plot);
}
// will skip if no plot widgets exist (can happen during constructor)
if (plotWidgets.length())
checkNoVisChannels();
void PlotManager::setupLayout(bool multiPlot)
// delete previous layout if it exists
if (_plotArea->layout() != 0)
delete _plotArea->layout();
if (multiPlot)
// setup a scroll area
Status change: