diff --git a/Filtration/ViewModels/ItemFilterCommentBlockViewModel.cs b/Filtration/ViewModels/ItemFilterCommentBlockViewModel.cs index 6719cfc..607b58f 100644 --- a/Filtration/ViewModels/ItemFilterCommentBlockViewModel.cs +++ b/Filtration/ViewModels/ItemFilterCommentBlockViewModel.cs @@ -58,11 +58,24 @@ namespace Filtration.ViewModels get { string[] commentLines = ItemFilterCommentBlock.Comment.Split(new[] { Environment.NewLine }, StringSplitOptions.None); - if (commentLines[0].StartsWith(@"============") || commentLines[0].StartsWith(@"------------")) + var titleOffset = 1; + if (commentLines.Length > 1 && (commentLines[0].StartsWith(@"============") || commentLines[0].StartsWith(@"------------"))) { + titleOffset = 3; commentLines[0] = commentLines[1]; } - return commentLines[0].TrimStart(' '); + + commentLines[0] = commentLines[0].TrimStart(' '); + if (commentLines[0].Length > 80) + { + commentLines[0] = commentLines[0].Substring(0, 80) + " (...)"; + } + else if (commentLines.Length > titleOffset) + { + commentLines[0] = commentLines[0] + " (...)"; + } + + return commentLines[0]; } } diff --git a/Filtration/ViewModels/ToolPanes/BlockGroupBrowserViewModel.cs b/Filtration/ViewModels/ToolPanes/BlockGroupBrowserViewModel.cs index a13f3c4..f205a39 100644 --- a/Filtration/ViewModels/ToolPanes/BlockGroupBrowserViewModel.cs +++ b/Filtration/ViewModels/ToolPanes/BlockGroupBrowserViewModel.cs @@ -28,6 +28,9 @@ namespace Filtration.ViewModels.ToolPanes icon.UriSource = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/block_group_browser_icon.png"); icon.EndInit(); IconSource = icon; + + IsVisible = false; + Messenger.Default.Register>(this, message => { switch (message.Notification) diff --git a/Filtration/Views/ToolPanes/CommentBlockBrowserView.xaml b/Filtration/Views/ToolPanes/CommentBlockBrowserView.xaml index 7c8e104..1098bcd 100644 --- a/Filtration/Views/ToolPanes/CommentBlockBrowserView.xaml +++ b/Filtration/Views/ToolPanes/CommentBlockBrowserView.xaml @@ -21,7 +21,7 @@ - +