diff --git a/src/game.cpp b/src/game.cpp index 9fff54c1..0270ba14 100755 --- a/src/game.cpp +++ b/src/game.cpp @@ -36,6 +36,8 @@ Game::Game(ConfigFile* c, GuiInterface* g, int qP, int sC, int sB) : myConfig(c) // cout << "Create Game Object" << "\n"; int i; + actualHandID = 0; + for(i=0; igetMaxQuantityPlayers(); i++) { playerArray[i] = 0; } diff --git a/src/gui/qt/mainwindowimpl.cpp b/src/gui/qt/mainwindowimpl.cpp index b8d659c1..618b9f71 100755 --- a/src/gui/qt/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindowimpl.cpp @@ -492,8 +492,9 @@ void mainWindowImpl::callSettingsDialog() { else { groupBox_tools->show(); } //Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen - if (v->getPlayerNickIsChanged()) { - cout << "wurst" << endl; + if (v->getPlayerNickIsChanged() && actualGame) { + + actualHand->getPlayerArray()[0]->setMyName(v->lineEdit_humanPlayerName->text().toStdString()); actualHand->getPlayerArray()[1]->setMyName(v->lineEdit_Opponent1Name->text().toStdString()); actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toStdString()); actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toStdString());