Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Jan 6, 2013
1 parent 60855c9 commit b4149de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -73,9 +73,7 @@ void RegisterCommands(ICollection<CommandBinding> commandBindings)

void ExecuteFind(object sender, ExecutedRoutedEventArgs e)
{
if (panel.IsClosed) {
panel.Open();
}
panel.Open();
panel.SearchPattern = TextArea.Selection.GetText();
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Input, (Action)delegate { panel.Reactivate(); });
}
Expand Down
Expand Up @@ -379,10 +379,12 @@ public void CloseAndRemove()
/// </summary>
public void Open()
{
if (!IsClosed) return;
var layer = AdornerLayer.GetAdornerLayer(textArea);
if (layer != null)
layer.Add(adorner);
textArea.TextView.BackgroundRenderers.Add(renderer);
IsClosed = false;
}

/// <summary>
Expand All @@ -391,7 +393,7 @@ public void Open()
public event EventHandler<SearchOptionsChangedEventArgs> SearchOptionsChanged;

/// <summary>
/// Raises the <see cref="SearchOptionsChanged" /> event.
/// Raises the <see cref="SearchPanel.SearchOptionsChanged" /> event.
/// </summary>
protected virtual void OnSearchOptionsChanged(SearchOptionsChangedEventArgs e)
{
Expand Down

0 comments on commit b4149de

Please sign in to comment.