Skip to content
Snippets Groups Projects
Commit 7e9ac8f6 authored by Dan Nixon's avatar Dan Nixon
Browse files

Only emit the signal when the data has changed

Refs #11377
parent ed7b8688
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ namespace MantidQt
connect(m_uiForm.pbLoadFile, SIGNAL(clicked()), this, SIGNAL(loadClicked()));
//data selected changes
connect(m_uiForm.rfFileInput, SIGNAL(filesFound()), this, SLOT(handleFileInput()));
connect(m_uiForm.rfFileInput, SIGNAL(filesFoundChanged()), this, SLOT(handleFileInput()));
connect(m_uiForm.wsWorkspaceInput, SIGNAL(currentIndexChanged(int)), this, SLOT(handleWorkspaceInput()));
connect(m_uiForm.pbLoadFile, SIGNAL(clicked()), this, SLOT(handleFileInput()));
......@@ -66,7 +66,7 @@ namespace MantidQt
/**
* Get if the file selector is currently being shown.
*
* @return :: true if it is visible, otherwise false
* @return :: true if it is visible, otherwise false
*/
bool DataSelector::isFileSelectorVisible() const
{
......@@ -77,7 +77,7 @@ namespace MantidQt
/**
* Get if the workspace selector is currently being shown.
*
* @return :: true if it is visible, otherwise false
* @return :: true if it is visible, otherwise false
*/
bool DataSelector::isWorkspaceSelectorVisible() const
{
......@@ -107,7 +107,7 @@ namespace MantidQt
if(isValid && m_autoLoad)
{
const QString wsName = getCurrentDataName();
if(!AnalysisDataService::Instance().doesExist(wsName.toStdString()))
{
//attempt to reload if we can
......@@ -118,9 +118,9 @@ namespace MantidQt
loadAlg->setProperty("Filename", filepath.toStdString());
loadAlg->setProperty("OutputWorkspace", wsName.toStdString());
loadAlg->execute();
isValid = AnalysisDataService::Instance().doesExist(wsName.toStdString());
if(!isValid)
{
m_uiForm.rfFileInput->setFileProblem("The specified workspace is missing from the analysis data service");
......@@ -448,18 +448,18 @@ namespace MantidQt
*/
void DataSelector::dropEvent(QDropEvent *de)
{
const QMimeData *mimeData = de->mimeData();
const QMimeData *mimeData = de->mimeData();
auto before_action = de->dropAction();
if (de->mimeData() && mimeData->text().contains(" = mtd[\"")){
m_uiForm.wsWorkspaceInput->dropEvent(de);
if (de->dropAction() == before_action){
if (de->dropAction() == before_action){
m_uiForm.cbInputType->setCurrentIndex(1);
return;
}
de->setDropAction(before_action);
de->setDropAction(before_action);
}
m_uiForm.rfFileInput->dropEvent(de);
if (de->dropAction() == before_action){
m_uiForm.cbInputType->setCurrentIndex(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment