#0026 图像工具箱新增移动和删除
This commit is contained in:
@@ -56,6 +56,8 @@ namespace XplorePlane.ViewModels
|
||||
SaveAsPipelineCommand = new DelegateCommand(async () => await SaveAsPipelineAsync());
|
||||
DeletePipelineCommand = new DelegateCommand(async () => await DeletePipelineAsync());
|
||||
LoadPipelineCommand = new DelegateCommand(async () => await LoadPipelineAsync());
|
||||
MoveNodeUpCommand = new DelegateCommand<PipelineNodeViewModel>(MoveNodeUp);
|
||||
MoveNodeDownCommand = new DelegateCommand<PipelineNodeViewModel>(MoveNodeDown);
|
||||
}
|
||||
|
||||
// ── State Properties ──────────────────────────────────────────
|
||||
@@ -135,6 +137,8 @@ namespace XplorePlane.ViewModels
|
||||
public DelegateCommand SaveAsPipelineCommand { get; }
|
||||
public DelegateCommand DeletePipelineCommand { get; }
|
||||
public DelegateCommand LoadPipelineCommand { get; }
|
||||
public DelegateCommand<PipelineNodeViewModel> MoveNodeUpCommand { get; }
|
||||
public DelegateCommand<PipelineNodeViewModel> MoveNodeDownCommand { get; }
|
||||
|
||||
// ── Command Implementations ───────────────────────────────────
|
||||
|
||||
@@ -197,6 +201,26 @@ namespace XplorePlane.ViewModels
|
||||
TriggerDebouncedExecution();
|
||||
}
|
||||
|
||||
private void MoveNodeUp(PipelineNodeViewModel node)
|
||||
{
|
||||
if (node == null) return;
|
||||
int index = PipelineNodes.IndexOf(node);
|
||||
if (index <= 0) return;
|
||||
PipelineNodes.Move(index, index - 1);
|
||||
RenumberNodes();
|
||||
TriggerDebouncedExecution();
|
||||
}
|
||||
|
||||
private void MoveNodeDown(PipelineNodeViewModel node)
|
||||
{
|
||||
if (node == null) return;
|
||||
int index = PipelineNodes.IndexOf(node);
|
||||
if (index < 0 || index >= PipelineNodes.Count - 1) return;
|
||||
PipelineNodes.Move(index, index + 1);
|
||||
RenumberNodes();
|
||||
TriggerDebouncedExecution();
|
||||
}
|
||||
|
||||
private void ReorderOperator(PipelineReorderArgs args)
|
||||
{
|
||||
if (args == null) return;
|
||||
|
||||
Reference in New Issue
Block a user