Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed bug in SearchPanel: could not be opened again, if it was closed…

… before.
  • Loading branch information...
commit 213847c31bbad3ecb99d253b08146d24404dfff4 1 parent 3875e60
Siegfried Pammer siegfriedpammer authored
2  src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchCommands.cs
View
@@ -71,7 +71,7 @@ void RegisterCommands(ICollection<CommandBinding> commandBindings)
void ExecuteFind(object sender, ExecutedRoutedEventArgs e)
{
- if (panel == null) {
+ if (panel == null || panel.IsClosed) {
panel = new SearchPanel();
panel.Attach(TextArea);
}
7 src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs
View
@@ -324,6 +324,11 @@ void SearchLayerKeyDown(object sender, KeyEventArgs e)
}
/// <summary>
+ /// Gets whether the Panel is already closed.
+ /// </summary>
+ public bool IsClosed { get; private set; }
+
+ /// <summary>
/// Closes the SearchPanel.
/// </summary>
public void Close()
@@ -336,6 +341,8 @@ public void Close()
if (currentDocument != null)
currentDocument.TextChanged -= textArea_Document_TextChanged;
messageView.IsOpen = false;
+ textArea.Focus();
+ IsClosed = true;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.