Only recreate sliders when the sensitivity tab is selected, rather than on every tab change.

This commit is contained in:
Glenn Maynard 2019-10-06 01:14:52 -05:00
parent 7171330abd
commit bb3ee5a0c9
2 changed files with 7 additions and 4 deletions

View File

@ -919,7 +919,7 @@ Use if the platform is too sensitive.</clr:String>
</Grid>
</TabItem>
<TabItem Header="Sensitivity">
<TabItem x:Name="SensitivityTab" Header="Sensitivity">
<Grid Background="#FFE5E5E5" RenderTransformOrigin="0.5,0.5">
<DockPanel Margin="0,0,0,0" VerticalAlignment="Stretch">
<TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0,15,0,10" VerticalAlignment="Top"

View File

@ -642,9 +642,12 @@ namespace smx_config
private void MainTab_Selected(object sender, RoutedEventArgs e)
{
// Refresh the threshold sliders, in case the enabled panels were changed
// on the advanced tab.
CreateThresholdSliders();
if(Main.SelectedItem == SensitivityTab)
{
// Refresh the threshold sliders, in case the enabled panels were changed
// on the advanced tab.
CreateThresholdSliders();
}
}
}
}