Skip to content

Commit

Permalink
Refs #6473. Changed the way the sequential dialog is opened.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Dec 13, 2013
1 parent cc81dc1 commit b28b209
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
Expand Up @@ -214,6 +214,8 @@ private slots:
/// Saves the value of the widget which called the slot
void saveWidgetValue();

/// Opens a sequential fit dialog
void openSequentialFitDialog();

private:

Expand Down
13 changes: 13 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Expand Up @@ -28,6 +28,7 @@
#include "MantidQtCustomInterfaces/MuonAnalysisResultTableTab.h"
#include "MantidQtMantidWidgets/FitPropertyBrowser.h"
#include "MantidQtMantidWidgets/MuonFitPropertyBrowser.h"
#include "MantidQtMantidWidgets/MuonSequentialFitDialog.h"

#include <Poco/File.h>
#include <Poco/Path.h>
Expand Down Expand Up @@ -148,6 +149,8 @@ void MuonAnalysis::initLayout()
}

m_uiForm.fitBrowser->init();
connect( m_uiForm.fitBrowser, SIGNAL(sequentialFitRequested()),
this, SLOT(openSequentialFitDialog()) );

// alow appending files
m_uiForm.mwRunFiles->allowMultipleFiles(true);
Expand Down Expand Up @@ -3678,5 +3681,15 @@ void MuonAnalysis::setGrouping(ITableWorkspace_sptr detGroupingTable)
updateFrontAndCombo();
}

/**
* Opens a sequential fit dialog.
*/
void MuonAnalysis::openSequentialFitDialog()
{
MuonSequentialFitDialog* dialog = new MuonSequentialFitDialog(m_uiForm.fitBrowser, loadAlg);
dialog->exec();

}

}//namespace MantidQT
}//namespace CustomInterfaces
Expand Up @@ -50,6 +50,9 @@ public slots:
/// Open sequential fit dialog
virtual void sequentialFit();

signals:
/// Emitted when sequential fit is requested by user
void sequentialFitRequested();

protected:
virtual void showEvent(QShowEvent* e);
Expand Down
@@ -1,5 +1,4 @@
#include "MantidQtMantidWidgets/MuonFitPropertyBrowser.h"
#include "MantidQtMantidWidgets/MuonSequentialFitDialog.h"
#include "MantidQtMantidWidgets/PropertyHandler.h"
#include "MantidAPI/FunctionFactory.h"

Expand Down Expand Up @@ -316,8 +315,7 @@ void MuonFitPropertyBrowser::fit()
*/
void MuonFitPropertyBrowser::sequentialFit()
{
MuonSequentialFitDialog* dialog = new MuonSequentialFitDialog(this);
dialog->exec();
emit sequentialFitRequested();
}

/**
Expand Down Expand Up @@ -346,6 +344,5 @@ bool MuonFitPropertyBrowser::isWorkspaceValid(Mantid::API::Workspace_sptr ws)con
return false;
}


} // MantidQt
} // API

0 comments on commit b28b209

Please sign in to comment.