Verified Commit c87c1566 authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Remove useless call to getEnsemble

parent 5c2b4ce1
Pipeline #79784 passed with stage
in 16 seconds
......@@ -27,7 +27,7 @@ class ParamAlpha: public QWidget {
public:
/// Construire une fenêtre de paramétrage de l'alphabet
/// @param[in] nbEtats nombre d'états à initialiser
ParamAlpha(const int nbEtats, const QWidget* parent);
ParamAlpha(const int nbEtats, const QWidget* parent);
public slots:
/// Valider le paramétrage de l'alphabet, a pour effet de l'initialiser dans l'automate
void valide();
......
......@@ -29,11 +29,8 @@ ParamAlpha::ParamAlpha(const int nbEtats, const QWidget *parent): QWidget(), nb(
form[i]->addRow("Bleu:", blue[i]);
}
connect(valider, SIGNAL(clicked()), parent, SLOT(changerVoisinage()));
connect(valider, SIGNAL(clicked()), parent, SLOT(paramRegle()));
connect(valider, SIGNAL(clicked()), parent, SLOT(changerVoisinage()));
connect(valider, SIGNAL(clicked()), parent, SLOT(paramRegle()));
connect(valider, SIGNAL(clicked()), this, SLOT(valide()));
general->addLayout(form[0], 0, 0, 1, 1);
......@@ -52,18 +49,13 @@ ParamAlpha::ParamAlpha(const int nbEtats, const QWidget *parent): QWidget(), nb(
if(nb == 8)
general->addLayout(form[7], 2, 1, 1, 1);
general->addWidget(valider, 2, 2, 1, 1, Qt::AlignBottom);
}
void ParamAlpha::valide() {
Automate::getInstance().getEnsemble().reset();
Automate::getInstance().getEnsemble();
for(int i = 0; i < nb; ++i)
Automate::getInstance().getEnsemble().ajouterEtat(i, label[i]->text().toStdString(), red[i]->value(), green[i]->value(), blue[i]->value());
Automate::getInstance().getEnsemble().reset();
for(int i = 0; i < nb; ++i) {
Automate::getInstance().getEnsemble().ajouterEtat(i, label[i]->text().toStdString(), red[i]->value(), green[i]->value(), blue[i]->value());
}
this->close();
this->close();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment