Changeset - eb15da5a6fac
[Not reviewed]
plot-manager
0 1 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-08-30 09:40:24
hy@ozderya.net
fix segfault on close
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/plotmanager.cpp
Show inline comments
 
@@ -161,25 +161,29 @@ void PlotManager::setupLayout(bool multi
 
        scrollArea->setWidget(scrolledPlotArea);
 
        scrollArea->setWidgetResizable(true);
 

	
 
        _plotArea->setLayout(new QVBoxLayout());
 
        _plotArea->layout()->addWidget(scrollArea);
 
        _plotArea->layout()->setContentsMargins(0,0,0,0);
 

	
 
        layout = new QVBoxLayout(scrolledPlotArea);
 
    }
 
    else
 
    {
 
        // delete scrollArea left from multi layout
 
        if (scrollArea != NULL) delete scrollArea;
 
        if (scrollArea != NULL)
 
        {
 
            delete scrollArea;
 
            scrollArea = NULL;
 
        }
 

	
 
        layout = new QVBoxLayout(_plotArea);
 
    }
 

	
 
    layout->setContentsMargins(2,2,2,2);
 
    layout->setSpacing(1);
 
}
 

	
 
Plot* PlotManager::addPlotWidget()
 
{
 
    auto plot = new Plot();
 
    plotWidgets.append(plot);
0 comments (0 inline, 0 general)