Sfoglia il codice sorgente

Fixed double on changed getting called in dynamic grid adding items

Kenric Nugteren 1 anno fa
parent
commit
2a105f8532

+ 1 - 1
InABox.Core/ILookupDefinition.cs

@@ -22,7 +22,7 @@ namespace InABox.Core
 
     public interface ILookupDefinition<TLookup, TEntity> where TLookup : Entity
     {
-        Filter<TLookup> DefineFilter(TEntity[] items);
+        Filter<TLookup>? DefineFilter(TEntity[] items);
 
         /// <summary>
         /// Define the columns required for the <c>items</c> parameter of <see cref="DefineFilter(TEntity[])"/>.

+ 0 - 2
inabox.wpf/DynamicGrid/DynamicGrid.cs

@@ -2605,7 +2605,6 @@ namespace InABox.DynamicGrid
             else if (AddEditClick(null))
             {
                 Refresh(false, true);
-                OnChanged?.Invoke(this, EventArgs.Empty);
             }
         }
 
@@ -2914,7 +2913,6 @@ namespace InABox.DynamicGrid
 
                 var item = CreateItem();
 
-                // Yea, and this won't work, because we're actually usually showing the description of a linked item,
                 // Yea, and this won't work, because we're actually usually showing the description of a linked item,
                 // not the id of the link, and we need to set the ID to have it work properly :-(