Fix stats screen group boxes sometimes having no spacing
authorWuzzy <Wuzzy2@mail.ru>
Tue, 28 May 2019 13:07:56 +0200
changeset 15076 dc236bcd7309
parent 15075 57f7d89067ef
child 15077 4c40266fae97
Fix stats screen group boxes sometimes having no spacing
QTfrontend/ui/page/pagegamestats.cpp
QTfrontend/ui/page/pagegamestats.h
--- a/QTfrontend/ui/page/pagegamestats.cpp	Tue May 28 01:58:42 2019 +0200
+++ b/QTfrontend/ui/page/pagegamestats.cpp	Tue May 28 13:07:56 2019 +0200
@@ -204,6 +204,7 @@
         if(maxDataPoints < 2) {
             labelGraphTitle->hide();
             graphic->hide();
+            applySpacing();
             return;
         }
 
@@ -275,6 +276,11 @@
         labelGraphTitle->show();
         gbDetails->show();
     }
+    applySpacing();
+}
+
+void PageGameStats::applySpacing()
+{
     if (!labelGameStats->isHidden())
     {
         labelGraphTitle->setText("<br>" + labelGraphTitle->text());
--- a/QTfrontend/ui/page/pagegamestats.h	Tue May 28 01:58:42 2019 +0200
+++ b/QTfrontend/ui/page/pagegamestats.h	Tue May 28 13:07:56 2019 +0200
@@ -65,6 +65,7 @@
 
     private:
         void AddStatText(const QString & msg);
+        void applySpacing();
 
         QMap<qint32, QVector<qint32> > healthPoints;
         unsigned int playerPosition;