>From eb602f8fcd07b6797cf69125d1abc31e5c785afd Mon Sep 17 00:00:00 2001
From: "Stefan Fellner (SFE)" <stefan.fellner@ntsretail.com>
Date: Mon, 13 Dec 2021 15:10:03 +0100
Subject: [PATCH] show stockValue (stockLevel) only when on
 ReportClassicColonyPanel.

---
 .../freecol/client/gui/label/ProductionLabel.java   | 13 ++++++-------
 .../gui/panel/report/ReportClassicColonyPanel.java  | 11 +++++------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/net/sf/freecol/client/gui/label/ProductionLabel.java b/src/net/sf/freecol/client/gui/label/ProductionLabel.java
index ad16a4845..d6d8b3dd8 100644
--- a/src/net/sf/freecol/client/gui/label/ProductionLabel.java
+++ b/src/net/sf/freecol/client/gui/label/ProductionLabel.java
@@ -21,7 +21,6 @@ package net.sf.freecol.client.gui.label;
 
 import java.awt.Color;
 import java.awt.Dimension;
-import java.awt.Font;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.Image;
@@ -34,9 +33,7 @@ import net.sf.freecol.FreeCol;
 import net.sf.freecol.client.ClientOptions;
 import net.sf.freecol.client.FreeColClient;
 import net.sf.freecol.client.gui.FontLibrary;
-import net.sf.freecol.client.gui.FontLibrary.FontType;
 import net.sf.freecol.client.gui.ImageLibrary;
-import net.sf.freecol.client.gui.Size;
 import net.sf.freecol.common.i18n.Messages;
 import net.sf.freecol.common.model.AbstractGoods;
 import net.sf.freecol.common.model.GoodsType;
@@ -85,8 +82,8 @@ public final class ProductionLabel extends AbstractGoodsLabel {
      * @param maximumProduction The maximum production.
      */
     public ProductionLabel(FreeColClient freeColClient, AbstractGoods ag,
-                           int maximumProduction) {
-        this(freeColClient, ag, maximumProduction, 0);
+            int maximumProduction) {
+        this(freeColClient, ag, maximumProduction, 0, false);
     }
 
     /**
@@ -96,9 +93,10 @@ public final class ProductionLabel extends AbstractGoodsLabel {
      * @param ag The {@code AbstractGoods} to create a label for.
      * @param maximumProduction The maximum production.
      * @param stockNumber The lower bound on number of items to display.
+     * @param showStockAmount Should the stockNumber be part of the label
      */
     public ProductionLabel(FreeColClient freeColClient, AbstractGoods ag,
-                           int maximumProduction, int stockNumber) {
+            int maximumProduction, int stockNumber, boolean showStockAmount) {
         super(freeColClient, ag);
 
         final ImageLibrary lib = getImageLibrary();
@@ -133,7 +131,8 @@ public final class ProductionLabel extends AbstractGoodsLabel {
         if (amount < 0 || amount >= displayNumber || amount > maxIcons
                 || stockNumber > 0 || showMax) {
             String number = "";
-            if (stockNumber >= 0) { // Show stored items in ReportColonyPanel
+            if (showStockAmount && stockNumber >= 0) { // Show stored items in
+                                                       // ReportColonyPanel
                 number = String.valueOf(stockNumber);
                 drawPlus = true;
             }
diff --git a/src/net/sf/freecol/client/gui/panel/report/ReportClassicColonyPanel.java b/src/net/sf/freecol/client/gui/panel/report/ReportClassicColonyPanel.java
index 183b77dd1..080455760 100644
--- a/src/net/sf/freecol/client/gui/panel/report/ReportClassicColonyPanel.java
+++ b/src/net/sf/freecol/client/gui/panel/report/ReportClassicColonyPanel.java
@@ -19,9 +19,10 @@
 
 package net.sf.freecol.client.gui.panel.report;
 
-import java.awt.GridLayout;
-import java.awt.event.ActionListener;
+import static net.sf.freecol.common.util.CollectionUtils.sort;
+import static net.sf.freecol.common.util.CollectionUtils.sum;
 
+import java.awt.GridLayout;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
@@ -33,12 +34,11 @@ import javax.swing.JPanel;
 import javax.swing.JSeparator;
 
 import net.miginfocom.swing.MigLayout;
-
 import net.sf.freecol.client.FreeColClient;
 import net.sf.freecol.client.gui.ImageLibrary;
 import net.sf.freecol.client.gui.label.ProductionLabel;
 import net.sf.freecol.client.gui.label.UnitLabel;
-import net.sf.freecol.client.gui.panel.*;
+import net.sf.freecol.client.gui.panel.Utility;
 import net.sf.freecol.common.i18n.Messages;
 import net.sf.freecol.common.model.AbstractGoods;
 import net.sf.freecol.common.model.BuildableType;
@@ -48,7 +48,6 @@ import net.sf.freecol.common.model.FreeColObject;
 import net.sf.freecol.common.model.GoodsType;
 import net.sf.freecol.common.model.Specification;
 import net.sf.freecol.common.model.Unit;
-import static net.sf.freecol.common.util.CollectionUtils.*;
 
 
 /**
@@ -145,7 +144,7 @@ public final class ReportClassicColonyPanel extends ReportPanel {
                     ProductionLabel productionLabel
                         = new ProductionLabel(getFreeColClient(),
                             new AbstractGoods(gt, newValue),
-                            maxProduction, stockValue);
+                                    maxProduction, stockValue, true);
                     if (count % GOODS_PER_ROW == 0) {
                         reportPanel.add(productionLabel,
                             "newline, split " + GOODS_PER_ROW);
-- 
2.32.0.windows.1

