fix return shortcut in racewindow

This commit is contained in:
2014-12-25 20:20:22 +01:00
parent 955c19b778
commit 4fe9b0449c
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -21,6 +21,8 @@ WindowRace::WindowRace(DataBase *db, QWidget *parent) :
this->ui->pBNextRace->setEnabled(false); this->ui->pBNextRace->setEnabled(false);
this->finished = false; this->finished = false;
this->wRennlisteSeted = false;
this->db = db; this->db = db;
@@ -132,6 +134,7 @@ void WindowRace::ReturnPress(){
//cout << "Return pressed" << endl; //cout << "Return pressed" << endl;
if(this->ui->pBNextRace->isEnabled()){ if(this->ui->pBNextRace->isEnabled()){
this->prepareNextRace(); this->prepareNextRace();
this->wRennliste->changeSelection();
} }
else{ else{
if(started){ if(started){
@@ -208,7 +211,9 @@ void WindowRace::stopClicked(){
} }
void WindowRace::setWindowRennliste(WindowRennliste *ptrInstance){ void WindowRace::setWindowRennliste(WindowRennliste *ptrInstance){
this->wRennliste = ptrInstance; this->wRennliste = ptrInstance;
this->wRennlisteSeted = true;
QObject::connect(this->ui->pBNextRace, SIGNAL(clicked()), this->wRennliste, SLOT(changeSelection())); QObject::connect(this->ui->pBNextRace, SIGNAL(clicked()), this->wRennliste, SLOT(changeSelection()));
} }
void WindowRace::setDriverAndCarId(vector<QString> vec){ void WindowRace::setDriverAndCarId(vector<QString> vec){
+1
View File
@@ -55,6 +55,7 @@ private:
DataBase *db; DataBase *db;
bool finished; bool finished;
WindowRennliste *wRennliste; WindowRennliste *wRennliste;
bool wRennlisteSeted;
int fahrzeit; int fahrzeit;
int renn_id; int renn_id;
int minimumTime; int minimumTime;