Permalink
Browse files

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

… before.
  • Loading branch information...
1 parent 3875e60 commit 213847c31bbad3ecb99d253b08146d24404dfff4 @siegfriedpammer siegfriedpammer committed Oct 26, 2011
@@ -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);
}
@@ -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;
}
}

0 comments on commit 213847c

Please sign in to comment.