Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<Expander
x:Name="expExcludedPaths"
Margin="0,10,0,0"
Collapsed="expExcludedPaths_Collapsed"
Expanded="expExcludedPaths_Click"
Header="{DynamicResource plugin_explorer_indexsearchexcludedpaths_header}">
<ListView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ public void RefreshView()

lbxExcludedPaths.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));

btnDelete.Visibility = Visibility.Hidden;
btnEdit.Visibility = Visibility.Hidden;
btnAdd.Visibility = Visibility.Hidden;
SetButtonVisibilityToHidden();

if (expAccessLinks.IsExpanded || expExcludedPaths.IsExpanded || expActionKeywords.IsExpanded)
{
Expand Down Expand Up @@ -123,8 +121,8 @@ private void expActionKeywords_Click(object sender, RoutedEventArgs e)

private void expActionKeywords_Collapsed(object sender, RoutedEventArgs e)
{
if (!expActionKeywords.IsExpanded)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this condition removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah because this method is hooked up to the ui which triggers when collapsed, so this condition is obsolete.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this condition removed?

expActionKeywords.Height = double.NaN;
expActionKeywords.Height = double.NaN;
SetButtonVisibilityToHidden();
}

private void expAccessLinks_Click(object sender, RoutedEventArgs e)
Expand All @@ -143,8 +141,8 @@ private void expAccessLinks_Click(object sender, RoutedEventArgs e)

private void expAccessLinks_Collapsed(object sender, RoutedEventArgs e)
{
if (!expAccessLinks.IsExpanded)
expAccessLinks.Height = double.NaN;
expAccessLinks.Height = double.NaN;
SetButtonVisibilityToHidden();
}

private void expExcludedPaths_Click(object sender, RoutedEventArgs e)
Expand All @@ -161,6 +159,11 @@ private void expExcludedPaths_Click(object sender, RoutedEventArgs e)
RefreshView();
}

private void expExcludedPaths_Collapsed(object sender, RoutedEventArgs e)
{
SetButtonVisibilityToHidden();
}

private void btnDelete_Click(object sender, RoutedEventArgs e)
{
var selectedRow = lbxAccessLinks.SelectedItem as AccessLink ?? lbxExcludedPaths.SelectedItem as AccessLink;
Expand Down Expand Up @@ -309,6 +312,13 @@ private void btnOpenIndexingOptions_Click(object sender, RoutedEventArgs e)
{
viewModel.OpenWindowsIndexingOptions();
}

public void SetButtonVisibilityToHidden()
{
btnDelete.Visibility = Visibility.Hidden;
btnEdit.Visibility = Visibility.Hidden;
btnAdd.Visibility = Visibility.Hidden;
}
}

public class ActionKeywordView
Expand Down