From 3f9e7488f11d1f95bede9b35b2b42c903ceb49f4 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Dec 2019 01:26:11 +0100 Subject: [PATCH] Bring selected pad to front, if there are multiple pads in one area. --- ILSpy/Analyzers/AnalyzerTreeView.cs | 2 +- ILSpy/Commands/ShowDebugSteps.cs | 2 +- ILSpy/DebugSteps.xaml.cs | 5 ----- ILSpy/Languages/ILAstLanguage.cs | 3 ++- ILSpy/MainWindow.xaml.cs | 2 +- ILSpy/ViewModels/ToolPaneModel.cs | 6 +++++- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ILSpy/Analyzers/AnalyzerTreeView.cs b/ILSpy/Analyzers/AnalyzerTreeView.cs index 4e6402b12..edbdf43cf 100644 --- a/ILSpy/Analyzers/AnalyzerTreeView.cs +++ b/ILSpy/Analyzers/AnalyzerTreeView.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.Analyzers public void Show() { - AnalyzerPaneModel.Instance.IsVisible = true; + AnalyzerPaneModel.Instance.Show(); } public void Show(AnalyzerTreeNode node) diff --git a/ILSpy/Commands/ShowDebugSteps.cs b/ILSpy/Commands/ShowDebugSteps.cs index 4f7c5fa8d..a5c3d98fd 100644 --- a/ILSpy/Commands/ShowDebugSteps.cs +++ b/ILSpy/Commands/ShowDebugSteps.cs @@ -11,7 +11,7 @@ namespace ICSharpCode.ILSpy.Commands { public override void Execute(object parameter) { - DebugStepsPaneModel.Instance.IsVisible = true; + DebugStepsPaneModel.Instance.Show(); } } } diff --git a/ILSpy/DebugSteps.xaml.cs b/ILSpy/DebugSteps.xaml.cs index 2caa04f1e..2ca862484 100644 --- a/ILSpy/DebugSteps.xaml.cs +++ b/ILSpy/DebugSteps.xaml.cs @@ -79,11 +79,6 @@ namespace ICSharpCode.ILSpy #endif } - public static void Show() - { - DebugStepsPaneModel.Instance.IsVisible = true; - } - void IPane.Closed() { #if DEBUG diff --git a/ILSpy/Languages/ILAstLanguage.cs b/ILSpy/Languages/ILAstLanguage.cs index 3d0fbdc8a..d7c100990 100644 --- a/ILSpy/Languages/ILAstLanguage.cs +++ b/ILSpy/Languages/ILAstLanguage.cs @@ -31,6 +31,7 @@ using ICSharpCode.Decompiler.TypeSystem; using SRM = System.Reflection.Metadata; using static System.Reflection.Metadata.PEReaderExtensions; +using ICSharpCode.ILSpy.ViewModels; namespace ICSharpCode.ILSpy { @@ -140,7 +141,7 @@ namespace ICSharpCode.ILSpy } } (output as ISmartTextOutput)?.AddButton(Images.ViewCode, "Show Steps", delegate { - DebugSteps.Show(); + DebugStepsPaneModel.Instance.Show(); }); output.WriteLine(); il.WriteTo(output, DebugSteps.Options); diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 0cdc577eb..c9b2612aa 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -915,7 +915,7 @@ namespace ICSharpCode.ILSpy void SearchCommandExecuted(object sender, ExecutedRoutedEventArgs e) { - SearchPaneModel.Instance.IsVisible = true; + SearchPaneModel.Instance.Show(); } #endregion diff --git a/ILSpy/ViewModels/ToolPaneModel.cs b/ILSpy/ViewModels/ToolPaneModel.cs index 8843fdd1a..d25e44bc7 100644 --- a/ILSpy/ViewModels/ToolPaneModel.cs +++ b/ILSpy/ViewModels/ToolPaneModel.cs @@ -20,6 +20,10 @@ namespace ICSharpCode.ILSpy.ViewModels { public abstract class ToolPaneModel : PaneModel { - + public void Show() + { + this.IsActive = true; + this.IsVisible = true; + } } }