summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjak1 <mike.wollmann@gmail.com>2020-06-02 17:19:47 +0200
committerAndrei Karas <akaras@inbox.ru>2020-06-03 11:07:37 +0300
commite680df07a3beefc0c8b4f301da06cbada3f75508 (patch)
tree77fca0c9b4b7930999cd50729343e71fa3fd9263
parent722716c9eeb4987bd19ad42684443883993cacb4 (diff)
downloadmv-e680df07a3beefc0c8b4f301da06cbada3f75508.tar.gz
mv-e680df07a3beefc0c8b4f301da06cbada3f75508.tar.bz2
mv-e680df07a3beefc0c8b4f301da06cbada3f75508.tar.xz
mv-e680df07a3beefc0c8b4f301da06cbada3f75508.zip
removed particle count from beeingpopup in case its 0
-rw-r--r--src/gui/popups/beingpopup.cpp16
1 files 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 ++)