Skip to content
Snippets Groups Projects
Commit b5e930ca authored by Jay Rainey's avatar Jay Rainey
Browse files

Validate dataSelector. Refs #8938.

- Although there is a dataSelector specific validator class (`UserInputValidator`), it is not possible to access it from `MantidQtCustomDialogs`.
parent 7c51efc8
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,10 @@ namespace MantidQt
/// Set the "FileName" property when a file is selected from the file browser.
void fileSelected();
protected:
/// Overridden to enable dataselector validators
void accept();
protected:
/// The form generated by QT Designer.
Ui::CatalogPublishDialog m_uiForm;
......
......@@ -110,5 +110,17 @@ namespace MantidQt
setPropertyValue("FileName", true);
}
/**
* Overridden to enable dataselector validators.
*/
void CatalogPublishDialog::accept()
{
if (!m_uiForm.dataSelector->isValid())
{
QMessageBox::critical(this,"Error in catalog publishing.",m_uiForm.dataSelector->getProblem());
return;
}
AlgorithmDialog::accept();
}
}
}
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