ソースを参照

Better fix to aforementioned bug

Kenric Nugteren 7 ヶ月 前
コミット
ef687028cc

+ 3 - 1
prs.desktop/Panels/Stock Forecast/OrderScreen/StockForecastOrderingGrid.cs

@@ -451,7 +451,7 @@ public class StockForecastOrderingGrid : DynamicItemsListGrid<StockOrderingItem>
             var row = Data.Rows[itemIdx];
             var row = Data.Rows[itemIdx];
             foreach(var ac in ActionColumns)
             foreach(var ac in ActionColumns)
             {
             {
-                if(supplierIdx >= QuantityColumns.Length || ac != QuantityColumns[supplierIdx])
+                if(ac != QuantityColumns[supplierIdx])
                 {
                 {
                     UpdateCell(row, ac);
                     UpdateCell(row, ac);
                 }
                 }
@@ -1056,6 +1056,7 @@ public class StockForecastOrderingGrid : DynamicItemsListGrid<StockOrderingItem>
                 }
                 }
                 newSuppliers[newIdx] = supplierProduct.SupplierLink;
                 newSuppliers[newIdx] = supplierProduct.SupplierLink;
 
 
+                SetObserving(false);
                 foreach (var (itemIdx, item) in Items.WithIndex())
                 foreach (var (itemIdx, item) in Items.WithIndex())
                 {
                 {
                     var quantities = new StockForecastOrderingItemQuantity[newSuppliers.Length];
                     var quantities = new StockForecastOrderingItemQuantity[newSuppliers.Length];
@@ -1085,6 +1086,7 @@ public class StockForecastOrderingGrid : DynamicItemsListGrid<StockOrderingItem>
                 {
                 {
                     CalculateSupplierProduct(item, newIdx);
                     CalculateSupplierProduct(item, newIdx);
                 }
                 }
+                SetObserving(true);
 
 
                 _loadedColumns = false;
                 _loadedColumns = false;
                 Refresh(true, true);
                 Refresh(true, true);