really fix leave game button bug
This commit is contained in:
@@ -377,7 +377,6 @@ void gameLobbyDialogImpl::refresh(int actionID)
|
||||
myGameListSelectionModel->clear();
|
||||
myGameListSelectionModel->clearSelection();
|
||||
myGameListSortFilterProxyModel->clear();
|
||||
|
||||
myNickListModel->clear();
|
||||
myNickListSelectionModel->clear();
|
||||
myNickListSelectionModel->clearSelection();;
|
||||
@@ -398,19 +397,15 @@ void gameLobbyDialogImpl::refresh(int actionID)
|
||||
//stop waitStartGameMsgBoxes
|
||||
waitStartGameMsgBoxTimer->stop();
|
||||
closeAllChildDialogs();
|
||||
|
||||
this->accept();
|
||||
myW->show();
|
||||
} else if(actionID == MSG_NET_GAME_CLIENT_SYNCSTART) {
|
||||
|
||||
waitStartGameMsgBoxTimer->start(2000);
|
||||
} else if(actionID == MSG_NET_GAME_CLIENT_SYNCREJOIN) {
|
||||
|
||||
if(this->isVisible()) {
|
||||
//break the autoStartTimer animation
|
||||
autoStartTimer->stop();
|
||||
autoStartTimerOverlay->hide();
|
||||
|
||||
//show msg dialog
|
||||
waitRejoinStartGameMsgBox->show();
|
||||
waitRejoinStartGameMsgBox->raise();
|
||||
@@ -1379,15 +1374,25 @@ void gameLobbyDialogImpl::reject()
|
||||
|
||||
void gameLobbyDialogImpl::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
//stop waitStartGameMsgBoxes
|
||||
waitStartGameMsgBoxTimer->stop();
|
||||
waitStartGameMsgBox->hide();
|
||||
waitRejoinStartGameMsgBox->hide();
|
||||
//enable leave button again - it was disabled during waitxyzMsgBoxes
|
||||
pushButton_Leave->setEnabled(true);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::accept()
|
||||
{
|
||||
//stop waitStartGameMsgBoxes
|
||||
waitStartGameMsgBoxTimer->stop();
|
||||
closeAllChildDialogs();
|
||||
//enable leave button again - it was disabled during waitxyzMsgBoxes
|
||||
pushButton_Leave->setEnabled(true);
|
||||
qDebug() << "hide";
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::writeDialogSettings(int saveMode)
|
||||
{
|
||||
|
||||
@@ -118,6 +118,7 @@ public slots:
|
||||
void joinAnyGameButtonRefresh();
|
||||
void reject();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void accept();
|
||||
void writeDialogSettings(int);
|
||||
void readDialogSettings();
|
||||
void changeGameListFilter(int);
|
||||
|
||||
@@ -199,7 +199,7 @@ void MyAvatarLabel::refreshTooltips()
|
||||
if((*it_c)->getMyType() == PLAYER_TYPE_COMPUTER) {
|
||||
computerPlayer = true;
|
||||
}
|
||||
if(!computerPlayer && getPlayerTip(QString::fromUtf8((*it_c)->getMyName().c_str()))!="") {
|
||||
if(!computerPlayer && getPlayerTip(QString::fromUtf8((*it_c)->getMyName().c_str()))!="" && seatPlace!=0) {
|
||||
myW->playerTipLabelArray[(*it_c)->getMyID()]->setText(QString("<a style='text-decoration: none; color: #"+myW->getMyGameTableStyle()->getPlayerInfoHintTextColor()+"; font-size: 14px; font-weight: bold; font-family:serif;' href=\'")+QString::fromUtf8((*it_c)->getMyName().c_str())+"\'>i</a>");
|
||||
myW->playerTipLabelArray[(*it_c)->getMyID()]->setToolTip( getPlayerTip(QString::fromUtf8((*it_c)->getMyName().c_str())) );
|
||||
myW->playerAvatarLabelArray[(*it_c)->getMyID()]->setToolTip( getPlayerTip(QString::fromUtf8((*it_c)->getMyName().c_str())) );
|
||||
|
||||
Reference in New Issue
Block a user