From b67dc384a202980057d2276ef197d3e38b9692f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Lach?= <slawek@lach.art.pl>
Date: Thu, 17 Nov 2022 16:15:49 +0100
Subject: [PATCH] =?UTF-8?q?!OSDN:=20Ticket:=20#45891=20:=20S=C5=82awomir?=
 =?UTF-8?q?=20Lach=20<slawek@lach.art.pl>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

ruledit will show counter count in selected ruleset

diff --git a/tools/ruledit/tab_misc.cpp b/tools/ruledit/tab_misc.cpp
index 1ec9724d2b..665e42eee5 100644
--- a/tools/ruledit/tab_misc.cpp
+++ b/tools/ruledit/tab_misc.cpp
@@ -35,6 +35,7 @@
 
 // common
 #include "achievements.h"
+#include "counters.h"
 #include "game.h"
 #include "government.h"
 #include "specialist.h"
@@ -223,6 +224,10 @@ tab_misc::tab_misc(ruledit_gui *ui_in) : QWidget()
   stats->setItem(5, 6, item);
   item = new QTableWidgetItem("-");
   stats->setItem(5, 7, item);
+  item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Counters")));
+  stats->setItem(6, 6, item);
+  item = new QTableWidgetItem("-");
+  stats->setItem(6, 7, item);
   stats->verticalHeader()->setVisible(false);
   stats->horizontalHeader()->setVisible(false);
   stats->setEditTriggers(QAbstractItemView::NoEditTriggers);
@@ -429,6 +434,13 @@ void tab_misc::refresh_stats()
   } multipliers_re_active_iterate_end;
   stats->item(row++, 7)->setText(QString::number(count));
 
+  count = 0;
+  city_counters_iterate(pcount) {
+     (void) pcount;
+    ++count;
+  } city_counters_iterate_end;
+  stats->item(row++, 7)->setText(QString::number(count));
+
   stats->resizeColumnsToContents();
 }
 
-- 
2.38.1

