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> </Grid>
</TabItem> </TabItem>
<TabItem Header="Sensitivity"> <TabItem x:Name="SensitivityTab" Header="Sensitivity">
<Grid Background="#FFE5E5E5" RenderTransformOrigin="0.5,0.5"> <Grid Background="#FFE5E5E5" RenderTransformOrigin="0.5,0.5">
<DockPanel Margin="0,0,0,0" VerticalAlignment="Stretch"> <DockPanel Margin="0,0,0,0" VerticalAlignment="Stretch">
<TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0,15,0,10" VerticalAlignment="Top" <TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0,15,0,10" VerticalAlignment="Top"

View File

@ -641,6 +641,8 @@ namespace smx_config
} }
private void MainTab_Selected(object sender, RoutedEventArgs e) private void MainTab_Selected(object sender, RoutedEventArgs e)
{
if(Main.SelectedItem == SensitivityTab)
{ {
// Refresh the threshold sliders, in case the enabled panels were changed // Refresh the threshold sliders, in case the enabled panels were changed
// on the advanced tab. // on the advanced tab.
@ -648,3 +650,4 @@ namespace smx_config
} }
} }
} }
}