Open Scottj1s opened 5 years ago
Yes, I've tripped over this myself quite a few times.
I don't know if it's related to this, but could be also great keep search text in case of refresh(F5), often when I do analysis I override binlog and press F5 with some filter i.e. '[coverlet]'. I fixed this in my local repo, I don't know if could be useful to someone else. Something like(but maybe could be structured to solve also other similar issue)
private BuildControl _oldBuildControl;
private BuildControl CurrentBuildControl => mainContent.Content as BuildControl;
private BuildControl _oldBuildControl;
private void SetContent(object content)
{
if (mainContent.Content is BuildControl)
{
_oldBuildControl = (BuildControl)mainContent.Content;
}
mainContent.Content = content;
if (content == null)
{
logFilePath = null;
projectFilePath = null;
currentBuild = null;
}
if (content is BuildControl)
{
ReloadMenu.Visibility = logFilePath != null ? Visibility.Visible : Visibility.Collapsed;
SaveAsMenu.Visibility = Visibility.Visible;
}
else
{
ReloadMenu.Visibility = Visibility.Collapsed;
SaveAsMenu.Visibility = Visibility.Collapsed;
}
if (mainContent.Content != null && _oldBuildControl != null && mainContent.Content is BuildControl currentContent && currentContent != _oldBuildControl && !string.IsNullOrEmpty(_oldBuildControl.searchLogControl.SearchText))
{
currentContent.searchLogControl.searchTextBox.SelectedText = _oldBuildControl.searchLogControl.SearchText;
}
}
@MarcoRossignoli this looks good to me, wanna send a PR?
Will do
I often find myself searching for the same text in all three tabs. But switching between them clears the search box. Preserving the text would nice (and a unified search across all 3 would be nicer). Thanks for this tool - indispensable!