From 4729b425ac689e7ed30d42bf74c4dd3ade1db776 Mon Sep 17 00:00:00 2001 From: Masusder <59669685+Masusder@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:55:34 +0200 Subject: [PATCH] Remove individual items from the queue --- CUE4Parse | 2 +- FModel/ViewModels/ExportSessionViewModel.cs | 16 +++++++ FModel/Views/ExportSessionWindow.xaml | 53 +++++++++++++++++---- FModel/Views/ExportSessionWindow.xaml.cs | 8 ++++ 4 files changed, 69 insertions(+), 10 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index d1c7083f..2436a339 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit d1c7083f32c1a6bf9aa4b2b25e9fd3a6cd53073f +Subproject commit 2436a339bae75b2ac5866d2127a6ef408b90acb2 diff --git a/FModel/ViewModels/ExportSessionViewModel.cs b/FModel/ViewModels/ExportSessionViewModel.cs index fbeb8f1c..85693b51 100644 --- a/FModel/ViewModels/ExportSessionViewModel.cs +++ b/FModel/ViewModels/ExportSessionViewModel.cs @@ -250,6 +250,22 @@ public class ExportSessionViewModel : ViewModel ClearExportHistory(); } + public void RemoveFromQueue(ObjectGroupViewModel item) + { + if (IsRunning || _session?.Remove(item.Path) != true) + return; + + var group = ClassGroups.FirstOrDefault(x => x.Objects.Contains(item)); + if (group == null) + return; + + group.Objects.Remove(item); + if (group.Objects.Count == 0) + { + ClassGroups.Remove(group); + } + } + private void StartUiTimer() { _uiTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(100) }; diff --git a/FModel/Views/ExportSessionWindow.xaml b/FModel/Views/ExportSessionWindow.xaml index 8e3f6b9d..66284629 100644 --- a/FModel/Views/ExportSessionWindow.xaml +++ b/FModel/Views/ExportSessionWindow.xaml @@ -199,19 +199,54 @@ Foreground="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" ToolTip="{Binding Path}" /> - + + + + + + + + + + + diff --git a/FModel/Views/ExportSessionWindow.xaml.cs b/FModel/Views/ExportSessionWindow.xaml.cs index 59966603..697b0a53 100644 --- a/FModel/Views/ExportSessionWindow.xaml.cs +++ b/FModel/Views/ExportSessionWindow.xaml.cs @@ -36,6 +36,14 @@ public partial class ExportSessionWindow viewModel.ClearQueue(); } + private void OnRemoveFromQueueClick(object sender, RoutedEventArgs e) + { + if (sender is Button { DataContext: ObjectGroupViewModel item } && DataContext is ExportSessionViewModel viewModel) + { + viewModel.RemoveFromQueue(item); + } + } + private void OnMakeDefaultOptions(object sender, RoutedEventArgs e) { if (sender is Button { DataContext: ExportSessionViewModel viewModel })