Browse Source

Use base type property

pull/333/head
Ionite 12 months ago
parent
commit
f2f20323ca
No known key found for this signature in database
  1. 4
      StabilityMatrix.Avalonia/ViewModels/Inference/StackEditableCardViewModel.cs

4
StabilityMatrix.Avalonia/ViewModels/Inference/StackEditableCardViewModel.cs

@ -62,7 +62,7 @@ public partial class StackEditableCardViewModel : StackViewModelBase
partial void OnIsEditEnabledChanged(bool value)
{
// Propagate edit state to children
foreach (var module in Cards.OfType<ModuleBase>())
foreach (var module in Cards.OfType<StackExpanderViewModel>())
{
module.IsEditEnabled = value;
}
@ -73,7 +73,7 @@ public partial class StackEditableCardViewModel : StackViewModelBase
{
base.OnCardAdded(item);
if (item is ModuleBase module)
if (item is StackExpanderViewModel module)
{
// Inherit our edit state
module.IsEditEnabled = IsEditEnabled;

Loading…
Cancel
Save