diff --git a/FModel/Framework/ViewModelCommand.cs b/FModel/Framework/ViewModelCommand.cs
index 4d064f2e..1730984e 100644
--- a/FModel/Framework/ViewModelCommand.cs
+++ b/FModel/Framework/ViewModelCommand.cs
@@ -27,7 +27,7 @@ namespace FModel.Framework
protected ViewModelCommand(TContextViewModel contextViewModel)
{
- ContextViewModel = contextViewModel /*?? throw new ArgumentNullException(nameof(contextViewModel))*/;
+ ContextViewModel = contextViewModel ?? throw new ArgumentNullException(nameof(contextViewModel));
}
public sealed override void Execute(object parameter)
diff --git a/FModel/MainWindow.xaml b/FModel/MainWindow.xaml
index 89289977..0369c96e 100644
--- a/FModel/MainWindow.xaml
+++ b/FModel/MainWindow.xaml
@@ -278,7 +278,7 @@
-
+
diff --git a/FModel/MainWindow.xaml.cs b/FModel/MainWindow.xaml.cs
index a4503082..1c9b1554 100644
--- a/FModel/MainWindow.xaml.cs
+++ b/FModel/MainWindow.xaml.cs
@@ -233,5 +233,12 @@ namespace FModel
return o is AssetItem assetItem && filters.All(x => assetItem.FullPath.SubstringAfterLast('/').Contains(x, StringComparison.OrdinalIgnoreCase));
};
}
+
+ private void OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
+ {
+ if (sender is not ListBox listBox) return;
+ UserSettings.Default.LoadingMode = ELoadingMode.Multiple;
+ _applicationView.LoadingModes.LoadCommand.Execute(listBox.SelectedItems);
+ }
}
}
\ No newline at end of file
diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs
index 87c4a87d..7a655333 100644
--- a/FModel/ViewModels/CUE4ParseViewModel.cs
+++ b/FModel/ViewModels/CUE4ParseViewModel.cs
@@ -617,17 +617,14 @@ namespace FModel.ViewModels
if (Provider.TrySavePackage(fullPath, out var assets))
{
- foreach (var (key, value) in assets)
+ foreach (var kvp in assets)
{
- directory = Path.Combine(directory, UserSettings.Default.KeepDirectoryStructure == EEnabledDisabled.Enabled
- ? key : key.SubstringAfterLast('/')).Replace('\\', '/');
- Directory.CreateDirectory(directory.SubstringBeforeLast('/'));
- File.WriteAllBytes(directory, value);
+ var path = Path.Combine(directory, UserSettings.Default.KeepDirectoryStructure == EEnabledDisabled.Enabled
+ ? kvp.Key : kvp.Key.SubstringAfterLast('/')).Replace('\\', '/');
+ Directory.CreateDirectory(path.SubstringBeforeLast('/'));
+ File.WriteAllBytes(path, kvp.Value);
}
- }
-
- if (File.Exists(directory))
- {
+
Log.Information("{FileName} successfully exported", fileName);
FLogger.AppendInformation();
FLogger.AppendText($"Successfully exported '{fileName}'", Constants.WHITE, true);
diff --git a/FModel/Views/SearchView.xaml.cs b/FModel/Views/SearchView.xaml.cs
index 9c9b287f..1684ebe8 100644
--- a/FModel/Views/SearchView.xaml.cs
+++ b/FModel/Views/SearchView.xaml.cs
@@ -36,7 +36,7 @@ namespace FModel.Views
WindowState = WindowState.Minimized;
MainWindow.YesWeCats.AssetsListName.ItemsSource = null;
- var folder = new GoToCommand(null).JumpTo(assetItem.FullPath.SubstringBeforeLast('/'));
+ var folder = _applicationView.CustomDirectories.GoToCommand.JumpTo(assetItem.FullPath.SubstringBeforeLast('/'));
if (folder == null) return;
do { await Task.Delay(100); } while (MainWindow.YesWeCats.AssetsListName.Items.Count < folder.AssetsList.Assets.Count);