Switch active profile when new profile is created

This commit is contained in:
Travis Nickles 2019-12-24 17:46:25 -06:00
parent c468514002
commit 1e148ba121
2 changed files with 6 additions and 0 deletions

View File

@ -1284,6 +1284,11 @@ Properties.Resources.DS4Update, MessageBoxButton.YesNo, MessageBoxImage.Question
private void Editor_CreatedProfile(ProfileEditor sender, string profile) private void Editor_CreatedProfile(ProfileEditor sender, string profile)
{ {
profileListHolder.AddProfileSort(profile); profileListHolder.AddProfileSort(profile);
int devnum = sender.DeviceNum;
if (devnum >= 0 && devnum+1 <= conLvViewModel.ControllerCol.Count)
{
conLvViewModel.ControllerCol[devnum].ChangeSelectedProfile(profile);
}
} }
private void NotifyIcon_TrayMouseDoubleClick(object sender, RoutedEventArgs e) private void NotifyIcon_TrayMouseDoubleClick(object sender, RoutedEventArgs e)

View File

@ -52,6 +52,7 @@ namespace DS4WinWPF.DS4Forms
private bool keepsize; private bool keepsize;
private bool controllerReadingsTabActive = false; private bool controllerReadingsTabActive = false;
public bool Keepsize { get => keepsize; } public bool Keepsize { get => keepsize; }
public int DeviceNum { get => deviceNum; }
private NonFormTimer inputTimer; private NonFormTimer inputTimer;