Update QuadraticBezierPathToolViewModel.cs

This commit is contained in:
Wiesław Šoltés 2022-11-22 11:06:12 +01:00
Родитель fe7229c0f7
Коммит 95df6b4656
1 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -229,14 +229,20 @@ public partial class QuadraticBezierPathToolViewModel : ViewModelBase, IPathTool
public void ToStatePoint3()
{
var editor = ServiceProvider.GetService<ProjectEditorViewModel>();
_selection?.Reset();
_selection = new QuadraticBezierSelection(
ServiceProvider,
editor.Project.CurrentContainer.HelperLayer,
_quadraticBezier,
editor.PageState.HelperStyle);
_selection.ToStatePoint3();
var editor = ServiceProvider.GetService<ProjectEditorViewModel>();
if (editor is { }
&& editor.Project?.CurrentContainer?.HelperLayer is { }
&& editor.PageState?.HelperStyle is { })
{
_selection = new QuadraticBezierSelection(
ServiceProvider,
editor.Project.CurrentContainer.HelperLayer,
_quadraticBezier,
editor.PageState.HelperStyle);
_selection.ToStatePoint3();
}
}
public void ToStatePoint2()