Unverified Commit 9de7e6dd authored by Merwane Bouri's avatar Merwane Bouri
Browse files

Correction Bouton Play/Pause

parent d4e87f28
Pipeline #79526 passed with stages
in 16 seconds
......@@ -76,7 +76,7 @@
<item>
<widget class="QPushButton" name="playPauseButton">
<property name="text">
<string>Pause</string>
<string>Play</string>
</property>
</widget>
</item>
......
......@@ -794,11 +794,11 @@ void MainWindow::on_playPauseButton_clicked()
{
if(timer->isActive()) {
//Pause
ui->playPauseButton->setText("Pause");
ui->playPauseButton->setText("Play");
timer->stop();
} else {
//Play
ui->playPauseButton->setText("play");
ui->playPauseButton->setText("Pause");
int frequence = ui->simSpeedSpinbox->value();
if(frequence == 0) {
QMessageBox::critical(this, "Impossible de démarrer", "Impossible de lancer la simulation à une vitesse nulle.");
......@@ -815,6 +815,7 @@ void MainWindow::on_resetButton_clicked() {
if(timer->isActive()) {
timer->stop();
}
ui->playPauseButton->setText("Play");
simulation.reset();
ui->grid_view->copy_grid(simulation.getGrid());
ui->stepsPeriodLabel->setText(QString::number(simulation.getPeriod())+" steps");
......
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