diff --git a/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/CatalogPublishDialog.h b/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/CatalogPublishDialog.h index b9f130c26f5fd6e01c2692c962b1455188a6b7f3..f40e2a317e6830904a50530ba1233ba5083ae543 100644 --- a/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/CatalogPublishDialog.h +++ b/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/CatalogPublishDialog.h @@ -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; diff --git a/Code/Mantid/MantidQt/CustomDialogs/src/CatalogPublishDialog.cpp b/Code/Mantid/MantidQt/CustomDialogs/src/CatalogPublishDialog.cpp index 863bcafccf9af871c70132a3dbd9a26e91f1bd46..9c14282c891a827052337669cc402c9bde0995cb 100644 --- a/Code/Mantid/MantidQt/CustomDialogs/src/CatalogPublishDialog.cpp +++ b/Code/Mantid/MantidQt/CustomDialogs/src/CatalogPublishDialog.cpp @@ -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(); + } } }