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

master
Glenn Maynard 5 years ago
parent 7171330abd
commit bb3ee5a0c9
  1. 2
      smx-config/MainWindow.xaml
  2. 3
      smx-config/MainWindow.xaml.cs

@ -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"

@ -641,10 +641,13 @@ 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.
CreateThresholdSliders(); CreateThresholdSliders();
} }
} }
}
} }

Loading…
Cancel
Save