From c6b39546ba68b9e55540862c30d809daec676fd6 Mon Sep 17 00:00:00 2001 From: Syping Date: Wed, 24 Jul 2019 20:05:34 +0200 Subject: [PATCH] remove function to click numbers (don't work anymore) --- PictureDialog.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/PictureDialog.cpp b/PictureDialog.cpp index 72e4313..0fe114f 100644 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -761,10 +761,15 @@ void PictureDialog::playerNameUpdated() QString PictureDialog::generateCrewString() { SnapmaticPicture *picture = smpic; // used by macro - QString crewIDStr = crewID; // save operation time + const QString crewIDStr = crewID; // save operation time if (crewIDStr != "0" && !crewIDStr.isEmpty()) { - return QString("" % crewStr % ""); + if (crewIDStr != crewStr) { + return QString("" % crewStr % ""); + } + else { + return QString(crewIDStr); + } } return tr("No Crew"); } @@ -776,11 +781,15 @@ QString PictureDialog::generatePlayersString() QString plyrsStr; if (playersList.length() >= 1) { - for (QString player : playersList) + for (const QString player : playersList) { - QString playerName; - playerName = profileDB->getPlayerName(player); - plyrsStr += ", " % playerName % ""; + const QString playerName = profileDB->getPlayerName(player); + if (player != playerName) { + plyrsStr += ", " % playerName % ""; + } + else { + plyrsStr += ", " % player; + } } plyrsStr.remove(0, 2); }