From e680df07a3beefc0c8b4f301da06cbada3f75508 Mon Sep 17 00:00:00 2001 From: jak1 Date: Tue, 2 Jun 2020 17:19:47 +0200 Subject: removed particle count from beeingpopup in case its 0 --- src/gui/popups/beingpopup.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index b09d560c3..7678a19fc 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -308,12 +308,16 @@ void BeingPopup::show(const int x, const int y, Being *const b) } } - ptr = mLabels[num]; - // TRANSLATORS: being popup label - ptr->setCaption(strprintf(_("Particles: %u"), - CAST_U32(b->getParticlesCount()))); - ptr->adjustSize(); - num ++; + const uint32_t particleCount = CAST_U32(b->getParticlesCount()); + if (particleCount != 0) + { + ptr = mLabels[num]; + // TRANSLATORS: being popup label + ptr->setCaption(strprintf(_("Particles: %u"), + particleCount)); + ptr->adjustSize(); + num ++; + } const size_t sz = mLabels.size(); for (size_t f = num; f < sz; f ++) -- cgit v1.2.3-70-g09d2