From 9f6bd7cd79f288f0e17f9c708894ea9ce57758b4 Mon Sep 17 00:00:00 2001 From: Arturs Bekasovs Date: Thu, 22 May 2014 11:41:06 +0100 Subject: [PATCH] Refs #9516. Create models in the constructor --- .../MantidQt/CustomInterfaces/src/Muon/ALCInterface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCInterface.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCInterface.cpp index b5259637ec32..cfcce6e7aaef 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCInterface.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Muon/ALCInterface.cpp @@ -24,8 +24,10 @@ namespace CustomInterfaces const QString ALCInterface::LABEL_FORMAT = "Step %1/%2 - %3"; ALCInterface::ALCInterface(QWidget* parent) - : UserSubWindow(parent), m_ui(), m_dataLoading(NULL), m_baselineModelling(NULL), - m_peakFitting(NULL) + : UserSubWindow(parent), m_ui(), + m_dataLoading(NULL), m_baselineModelling(NULL), m_peakFitting(NULL), + m_baselineModellingModel(new ALCBaselineModellingModel()), + m_peakFittingModel(new ALCPeakFittingModel()) {} void ALCInterface::initLayout() @@ -40,12 +42,10 @@ namespace CustomInterfaces m_dataLoading = new ALCDataLoadingPresenter(dataLoadingView); m_dataLoading->initialize(); - m_baselineModellingModel = new ALCBaselineModellingModel(); auto baselineModellingView = new ALCBaselineModellingView(m_ui.baselineModellingView); m_baselineModelling = new ALCBaselineModellingPresenter(baselineModellingView, m_baselineModellingModel); m_baselineModelling->initialize(); - m_peakFittingModel = new ALCPeakFittingModel(); auto peakFittingView = new ALCPeakFittingView(m_ui.peakFittingView); m_peakFitting = new ALCPeakFittingPresenter(peakFittingView, m_peakFittingModel); m_peakFitting->initialize();