diff --git a/windowrace.cpp b/windowrace.cpp index d83c74c..2a9dc7a 100644 --- a/windowrace.cpp +++ b/windowrace.cpp @@ -21,6 +21,8 @@ WindowRace::WindowRace(DataBase *db, QWidget *parent) : this->ui->pBNextRace->setEnabled(false); this->finished = false; + this->wRennlisteSeted = false; + this->db = db; @@ -132,6 +134,7 @@ void WindowRace::ReturnPress(){ //cout << "Return pressed" << endl; if(this->ui->pBNextRace->isEnabled()){ this->prepareNextRace(); + this->wRennliste->changeSelection(); } else{ if(started){ @@ -208,7 +211,9 @@ void WindowRace::stopClicked(){ } void WindowRace::setWindowRennliste(WindowRennliste *ptrInstance){ + this->wRennliste = ptrInstance; + this->wRennlisteSeted = true; QObject::connect(this->ui->pBNextRace, SIGNAL(clicked()), this->wRennliste, SLOT(changeSelection())); } void WindowRace::setDriverAndCarId(vector vec){ diff --git a/windowrace.h b/windowrace.h index a6358cf..5285c6d 100644 --- a/windowrace.h +++ b/windowrace.h @@ -55,6 +55,7 @@ private: DataBase *db; bool finished; WindowRennliste *wRennliste; + bool wRennlisteSeted; int fahrzeit; int renn_id; int minimumTime;