Skip to content

Commit

Permalink
fix: Fix crash during output (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuto-trd authored Oct 5, 2024
1 parent c4b711b commit 7cb46bf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Beutl/ViewModels/Editors/BrushEditorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public BrushEditorViewModel(IPropertyAdapter property)
{
Value = property.GetObservable()
.Select(x => x as IBrush)
.ToReadOnlyReactivePropertySlim()
.ToReadOnlyReactiveProperty()
.DisposeWith(Disposables);

AvaloniaBrush = new ReactiveProperty<Avalonia.Media.Brush?>();
Expand Down Expand Up @@ -78,7 +78,7 @@ private void AcceptChildren(PropertiesEditorViewModel? obj)
}
}

public ReadOnlyReactivePropertySlim<IBrush?> Value { get; }
public ReadOnlyReactiveProperty<IBrush?> Value { get; }

public ReactiveProperty<Avalonia.Media.Brush?> AvaloniaBrush { get; }

Expand Down
4 changes: 2 additions & 2 deletions src/Beutl/ViewModels/Editors/FileInfoEditorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public StorageFileEditorViewModel(IPropertyAdapter<FileInfo> property)
: base(property)
{
Value = property.GetObservable()
.ToReadOnlyReactivePropertySlim()
.ToReadOnlyReactiveProperty()
.DisposeWith(Disposables);
}

public ReadOnlyReactivePropertySlim<FileInfo?> Value { get; }
public ReadOnlyReactiveProperty<FileInfo?> Value { get; }

public override void Accept(IPropertyEditorContextVisitor visitor)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Beutl/ViewModels/Editors/ParsableEditorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public interface IParsableEditorViewModel
{
ReadOnlyReactivePropertySlim<bool> CanEdit { get; }

ReadOnlyReactivePropertySlim<string> Value { get; }
ReadOnlyReactiveProperty<string> Value { get; }

string Header { get; }
}
Expand All @@ -19,9 +19,9 @@ public ParsableEditorViewModel(IPropertyAdapter<T> property)
{
Value = property.GetObservable()
.Select(x => x?.ToString() ?? "")
.ToReadOnlyReactivePropertySlim()
.ToReadOnlyReactiveProperty()
.DisposeWith(Disposables)!;
}

public ReadOnlyReactivePropertySlim<string> Value { get; }
public ReadOnlyReactiveProperty<string> Value { get; }
}
4 changes: 2 additions & 2 deletions src/Beutl/ViewModels/Editors/PenEditorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public PenEditorViewModel(IPropertyAdapter property)
{
Value = property.GetObservable()
.Select(x => x as IPen)
.ToReadOnlyReactivePropertySlim()
.ToReadOnlyReactiveProperty()
.DisposeWith(Disposables);

Value.Subscribe(Update)
Expand Down Expand Up @@ -93,7 +93,7 @@ private void AcceptChildren()

public ReactivePropertySlim<bool> IsExpanded { get; } = new(false);

public ReadOnlyReactivePropertySlim<IPen?> Value { get; }
public ReadOnlyReactiveProperty<IPen?> Value { get; }

public CoreList<IPropertyEditorContext> MajorProperties { get; } = [];

Expand Down

0 comments on commit 7cb46bf

Please sign in to comment.