Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions OpenUtau/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@ public async Task OpenSingersWindowAsync() {
});

dialog = new SingersDialog() { DataContext = vm };
dialog.Show();
}
if (dialog.Position.Y < 0) {
dialog.Position = dialog.Position.WithY(0);
Expand All @@ -573,10 +572,18 @@ public async Task OpenSingersWindowAsync() {
LoadingWindow.EndLoading();
}
if (dialog != null) {
dialog.Activate();
ShowToolWindow(dialog);
}
}

private static void ShowToolWindow(Window window) {
if (window.WindowState == WindowState.Minimized) {
window.WindowState = WindowState.Normal;
}
window.Show();
window.Activate();
}

async void OnMenuInstallSinger(object sender, RoutedEventArgs args) {
var file = await FilePicker.OpenFileAboutSinger(
this, "menu.tools.singer.install", FilePicker.ArchiveFiles);
Expand Down Expand Up @@ -682,7 +689,7 @@ void OnMenuDebugWindow(object sender, RoutedEventArgs args) {
if (window == null) {
window = new DebugWindow();
}
window.Show();
ShowToolWindow(window);
}

void OnMenuPhoneticAssistant(object sender, RoutedEventArgs args) {
Expand All @@ -694,7 +701,7 @@ void OnMenuPhoneticAssistant(object sender, RoutedEventArgs args) {
if (window == null) {
window = new PhoneticAssistant();
}
window.Show();
ShowToolWindow(window);
}

void OnMenuCheckUpdate(object sender, RoutedEventArgs args) {
Expand Down
Loading