From ad8e47a35d21e1fedb9cafbeeab7a6cc2beccdb2 Mon Sep 17 00:00:00 2001 From: Zach H Date: Thu, 5 Feb 2015 17:23:11 -0500 Subject: [PATCH] flag fix --- cockatrice/src/userinfobox.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/userinfobox.cpp b/cockatrice/src/userinfobox.cpp index 0fd0e569..91201f99 100644 --- a/cockatrice/src/userinfobox.cpp +++ b/cockatrice/src/userinfobox.cpp @@ -67,8 +67,18 @@ void UserInfoBox::updateInfo(const ServerInfo_User &user) realNameLabel2.setText(QString::fromStdString(user.real_name())); genderLabel2.setPixmap(GenderPixmapGenerator::generatePixmap(15, user.gender())); QString country = QString::fromStdString(user.country()); - countryLabel2.setPixmap(CountryPixmapGenerator::generatePixmap(15, country)); - countryLabel3.setText(QString("(%1)").arg(country.toUpper())); + + if (country.length() != 0) + { + countryLabel2.setPixmap(CountryPixmapGenerator::generatePixmap(15, country)); + countryLabel3.setText(QString("(%1)").arg(country.toUpper())); + } + else + { + countryLabel2.setText(""); + countryLabel3.setText(""); + } + userLevelLabel2.setPixmap(UserLevelPixmapGenerator::generatePixmap(15, userLevel, false)); QString userLevelText; if (userLevel.testFlag(ServerInfo_User::IsAdmin))