Disable Controller Readings tab when not associated with a controller and profile

Related to issue #1070
This commit is contained in:
Travis Nickles 2020-03-15 00:58:29 -05:00
parent 90f5a1b5d7
commit a51d789177
2 changed files with 3 additions and 1 deletions

View File

@ -323,7 +323,7 @@
</DockPanel>
</DockPanel>
</TabItem>
<TabItem x:Name="contReadingsTab" Header="Controller Readings">
<TabItem x:Name="contReadingsTab" Header="Controller Readings" IsEnabled="False">
<local:ControllerReadingsControl x:Name="conReadingsUserCon" />
</TabItem>
</TabControl>

View File

@ -539,11 +539,13 @@ namespace DS4WinWPF.DS4Forms
{
useControllerUD.Value = device + 1;
conReadingsUserCon.UseDevice(device);
contReadingsTab.IsEnabled = true;
}
else
{
useControllerUD.Value = 1;
conReadingsUserCon.UseDevice(0);
contReadingsTab.IsEnabled = false;
}
conReadingsUserCon.EnableControl(false);