diff --git a/Filtration/Filtration.nuspec b/Filtration/Filtration.nuspec
index 80ac0a6..b23716b 100644
--- a/Filtration/Filtration.nuspec
+++ b/Filtration/Filtration.nuspec
@@ -9,26 +9,9 @@
A Path of Exile loot filter script editor
false
Copyright 2018
- ### New Features
-
-* Implemented copying and pasting of multiple blocks (multiple blocks can be selected by holding the Ctrl and/or Shift keys while clicking)
-* Added Expand All, Collapse All, and Clear All Filters buttons to the Block Group Browser
-* It is now possible to add/remove Block Groups from blocks (there is a new text box and a + button on each block in the editor)
-* The Block Group browser now has an additional column of checkboxes which enables block groups to be enabled/disabled as well as shown/hidden
-* Implemented a new auto-update mechanism - previous versions of Filtration will need to be manually uninstalled
-* The state (maximised/restored) and size of the application window is now remembered
-* The visibility of the Section Browser, Block Group Browser, and Block Output Preview tool panes is now remembered
-* The last active script is now re-opened on when the application is launched
-
-### Bug Fixes / Improvements
-
-* Fixed incorrect filtering behavior in the Block Group Browser
-* Increased the maximum value of Quality block items to 30 from 20
-* Changed default opacity of colours to 240 from 255
-* MinimapIcon preview icons have been improved in appearance and now have a transparent background
-* Fixed an issue where several section-related commands didn't correctly mark the script as unsaved
-* Increased the HasExplicitMod block item limit from 1 to 8 since it is possible to use up to 8 of these blocks together to only match items that have an explicit mod from all HasExplicitMod block items within a block
-* Changed the default colours of TextColor, BorderColor and BackgroundColor block items to sensible defaults instead of 100% transparent
+ * Fixed the Block Output Preview pane not working
+* The Block Output Preview pane now supports previewing multiple selected blocks
+* The Block Output Preview pane now supports selecting the text within it
diff --git a/Filtration/Properties/AssemblyInfo.cs b/Filtration/Properties/AssemblyInfo.cs
index f7f7d25..ea8b597 100644
--- a/Filtration/Properties/AssemblyInfo.cs
+++ b/Filtration/Properties/AssemblyInfo.cs
@@ -10,8 +10,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0")]
+[assembly: AssemblyVersion("1.0.1")]
+[assembly: AssemblyInformationalVersion("1.0.1")]
[assembly: InternalsVisibleTo("Filtration.Tests")]
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
diff --git a/Filtration/ViewModels/ItemFilterScriptViewModel.cs b/Filtration/ViewModels/ItemFilterScriptViewModel.cs
index bcc2f72..154dab6 100644
--- a/Filtration/ViewModels/ItemFilterScriptViewModel.cs
+++ b/Filtration/ViewModels/ItemFilterScriptViewModel.cs
@@ -143,6 +143,7 @@ namespace Filtration.ViewModels
{
RaisePropertyChanged(nameof(SelectedBlockViewModels));
RaisePropertyChanged(nameof(LastSelectedBlockViewModel));
+ Messenger.Default.Send(new NotificationMessage("LastSelectedBlockChanged"));
};
_lastAddedBlocks = new List();
_showAdvanced = Settings.Default.ShowAdvanced;
diff --git a/Filtration/ViewModels/ToolPanes/BlockOutputPreviewViewModel.cs b/Filtration/ViewModels/ToolPanes/BlockOutputPreviewViewModel.cs
index 6567855..cc25946 100644
--- a/Filtration/ViewModels/ToolPanes/BlockOutputPreviewViewModel.cs
+++ b/Filtration/ViewModels/ToolPanes/BlockOutputPreviewViewModel.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Windows.Media.Imaging;
using Filtration.Parser.Interface.Services;
using GalaSoft.MvvmLight.Messaging;
@@ -28,19 +29,10 @@ namespace Filtration.ViewModels.ToolPanes
Messenger.Default.Register(this, message =>
{
- switch (message.Notification)
- {
- case "LastSelectedBlockChanged":
- {
- OnLastSelectedBlockChanged(this, EventArgs.Empty);
- break;
- }
- case "ActiveDocumentChanged":
- {
- OnLastSelectedBlockChanged(this, EventArgs.Empty);
- break;
- }
- }
+ if (message.Notification == "LastSelectedBlockChanged")
+ OnLastSelectedBlockChanged(this, EventArgs.Empty);
+ else if (message.Notification == "ActiveDocumentChanged")
+ OnLastSelectedBlockChanged(this, EventArgs.Empty);
});
}
@@ -49,7 +41,7 @@ namespace Filtration.ViewModels.ToolPanes
public string PreviewText
{
- get { return _previewText; }
+ get => _previewText;
private set
{
_previewText = value;
@@ -64,15 +56,16 @@ namespace Filtration.ViewModels.ToolPanes
private void OnLastSelectedBlockChanged(object sender, EventArgs e)
{
- if (AvalonDockWorkspaceViewModel.ActiveScriptViewModel?.LastSelectedBlockViewModel == null)
+ if (AvalonDockWorkspaceViewModel.ActiveScriptViewModel?.SelectedBlockViewModels == null ||
+ AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels.Count == 0)
{
PreviewText = string.Empty;
return;
}
-
- PreviewText =
- _itemFilterBlockTranslator.TranslateItemFilterBlockBaseToString(
- AvalonDockWorkspaceViewModel.ActiveScriptViewModel.LastSelectedBlockViewModel.BaseBlock);
+
+ PreviewText = AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels
+ .Select(s => _itemFilterBlockTranslator.TranslateItemFilterBlockBaseToString(s.BaseBlock))
+ .Aggregate((prev, curr) => prev + Environment.NewLine + Environment.NewLine + curr);
}
}
}
diff --git a/Filtration/Views/ToolPanes/BlockOutputPreviewView.xaml b/Filtration/Views/ToolPanes/BlockOutputPreviewView.xaml
index cbb818b..92580a7 100644
--- a/Filtration/Views/ToolPanes/BlockOutputPreviewView.xaml
+++ b/Filtration/Views/ToolPanes/BlockOutputPreviewView.xaml
@@ -8,6 +8,6 @@
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
-
+