mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Force prevent multiple profile editors from being created
This commit is contained in:
parent
b6b57ed7ca
commit
09f7635b47
@ -1275,19 +1275,23 @@ Suspend support not enabled.", true);
|
|||||||
|
|
||||||
private void ShowProfileEditor(int device, ProfileEntity entity = null)
|
private void ShowProfileEditor(int device, ProfileEntity entity = null)
|
||||||
{
|
{
|
||||||
profOptsToolbar.Visibility = Visibility.Collapsed;
|
if (editor == null)
|
||||||
profilesListBox.Visibility = Visibility.Collapsed;
|
{
|
||||||
|
profOptsToolbar.Visibility = Visibility.Collapsed;
|
||||||
|
profilesListBox.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
preserveSize = false;
|
preserveSize = false;
|
||||||
oldSize.Width = Width;
|
oldSize.Width = Width;
|
||||||
oldSize.Height = Height;
|
oldSize.Height = Height;
|
||||||
this.Width = 1000;
|
this.Width = 1000;
|
||||||
this.Height = 650;
|
this.Height = 650;
|
||||||
editor = new ProfileEditor(device);
|
editor = new ProfileEditor(device);
|
||||||
editor.CreatedProfile += Editor_CreatedProfile;
|
editor.CreatedProfile += Editor_CreatedProfile;
|
||||||
editor.Closed += ProfileEditor_Closed;
|
editor.Closed += ProfileEditor_Closed;
|
||||||
profDockPanel.Children.Add(editor);
|
profDockPanel.Children.Add(editor);
|
||||||
editor.Reload(device, entity);
|
editor.Reload(device, entity);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Editor_CreatedProfile(ProfileEditor sender, string profile)
|
private void Editor_CreatedProfile(ProfileEditor sender, string profile)
|
||||||
|
Loading…
Reference in New Issue
Block a user