From 357916a4d7901e3a04f987724df0a471a222949c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sebastian=20kr=C3=A4mer?= Date: Thu, 19 Dec 2013 11:40:49 +0100 Subject: [PATCH] fix highlighting again --- MONI/Properties/AssemblyInfo.cs | 4 ++-- .../HighLightSearchTextConverter.cs | 17 ++++++++--------- moni_updates.json | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/MONI/Properties/AssemblyInfo.cs b/MONI/Properties/AssemblyInfo.cs index ad0df8c..cd61d63 100644 --- a/MONI/Properties/AssemblyInfo.cs +++ b/MONI/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.9.0")] -[assembly: AssemblyFileVersion("0.9.9.0")] +[assembly: AssemblyVersion("0.9.9.1")] +[assembly: AssemblyFileVersion("0.9.9.1")] diff --git a/MONI/ValueConverter/HighLightSearchTextConverter.cs b/MONI/ValueConverter/HighLightSearchTextConverter.cs index 53424a5..4f0039c 100644 --- a/MONI/ValueConverter/HighLightSearchTextConverter.cs +++ b/MONI/ValueConverter/HighLightSearchTextConverter.cs @@ -39,16 +39,15 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur if (!string.IsNullOrWhiteSpace(preText)) { wp.Inlines.Add(new Run(preText)); + } + Run lastRun = wp.Inlines.LastInline as Run; + if (lastRun != null && lastRun.Background == highLightBrush) { + lastRun.Text += matchText; } else { - Run lastRun = wp.Inlines.LastInline as Run; - if (lastRun != null && lastRun.Background == highLightBrush) { - lastRun.Text += matchText; - } else { - var run = new Run(matchText); - run.Background = highLightBrush; - run.Foreground = Brushes.DimGray; - wp.Inlines.Add(run); - } + var run = new Run(matchText); + run.Background = highLightBrush; + run.Foreground = Brushes.DimGray; + wp.Inlines.Add(run); } found = true; } diff --git a/moni_updates.json b/moni_updates.json index f567377..f36ad8a 100644 --- a/moni_updates.json +++ b/moni_updates.json @@ -75,6 +75,6 @@ "Projekt-/Positionsnummern-Suche: Der Suchtext kann ein Regulärer Ausdruck sein, leider gabs Ärger beim Eingeben. Jetzt nicht mehr.", "Alle Pfade unterstützen jetzt #{appdata} und #{userhome} als Platzhalter.", ], - "DownLoadURL" : "https://github.com/dotob/moni/releases/download/0.9.9.0/MONI.exe" + "DownLoadURL" : "https://github.com/dotob/moni/releases/download/0.9.9.1/MONI.exe" }, ] \ No newline at end of file