diff --git a/sources/nomenclature.cpp b/sources/nomenclature.cpp index 14de5fe39..d466d18c9 100644 --- a/sources/nomenclature.cpp +++ b/sources/nomenclature.cpp @@ -46,12 +46,8 @@ nomenclature::~nomenclature() { @param true if success */ bool nomenclature::saveToCSVFile() { - if(m_list_diagram.isEmpty()) - QMessageBox msgBox; - msgBox.setText("Le titre du projet est vide, veuillez le remplir."); - msgBox.exec(); - return false; - + if(m_list_diagram.isEmpty()) return false; + //Process... QString data = tr("NOMENCLATURE : ") + m_project -> title() + "\n\n"; data += tr("Folio") +";"+ tr("Sch\351ma") +";"+ tr("D\351signation")+";"+ tr("Label") +";"+ tr("Commententaire") +";"+ tr("Fabriquant") +";"+ tr("Reference") +";"+ tr("Machine-reference\n"); @@ -62,7 +58,7 @@ bool nomenclature::saveToCSVFile() { data += rows.at(j); } } - + // SAVE IN FILE QString name = tr("nomenclature_") + QString(m_project -> title()); QString filename = QFileDialog::getSaveFileName(this->m_parent, tr("Enregister sous... "), name, tr("Fichiers csv (*.csv)")); diff --git a/sources/nomenclature.h b/sources/nomenclature.h index 5ef94bb53..c51a7367e 100644 --- a/sources/nomenclature.h +++ b/sources/nomenclature.h @@ -42,7 +42,6 @@ class nomenclature : public QObject { QETProject *m_project; QList m_list_diagram; QWidget *m_parent; - QMessageBox msgBox; // constructors, destructor public: