UI: gitTipos() 前先 updateScence() 以解决首次落子时状态栏未更新的问题

This commit is contained in:
Calcitem 2020-10-04 20:08:40 +08:00
parent 756b2f271a
commit 514b07d23f
1 changed files with 5 additions and 0 deletions

View File

@ -262,6 +262,7 @@ void GameController::gameReset()
emit time2Changed(qtime.toString("hh:mm:ss"));
// 发信号更新状态栏
updateScence();
message = QString::fromStdString(getTips());
emit statusBarChanged(message);
@ -695,6 +696,7 @@ void GameController::timerEvent(QTimerEvent *event)
#ifndef TRAINING_MODE
// 发信号更新状态栏
updateScence();
message = QString::fromStdString(getTips());
emit statusBarChanged(message);
@ -778,6 +780,7 @@ bool GameController::actionPiece(QPointF pos)
timeID = startTimer(100);
// 发信号更新状态栏
updateScence();
message = QString::fromStdString(getTips());
emit statusBarChanged(message);
#ifndef MOBILE_APP_UI
@ -846,6 +849,7 @@ bool GameController::actionPiece(QPointF pos)
if (result) {
// 发信号更新状态栏
updateScence();
message = QString::fromStdString(getTips());
emit statusBarChanged(message);
@ -974,6 +978,7 @@ bool GameController::command(const string &cmd, bool update /* = true */)
}
// 发信号更新状态栏
updateScence();
message = QString::fromStdString(getTips());
emit statusBarChanged(message);