diff --git a/Platform/macOS/VMConfigQEMUArgumentsView.swift b/Platform/macOS/VMConfigQEMUArgumentsView.swift index 196ac3ffb..563a9b100 100644 --- a/Platform/macOS/VMConfigQEMUArgumentsView.swift +++ b/Platform/macOS/VMConfigQEMUArgumentsView.swift @@ -57,91 +57,21 @@ struct VMConfigQEMUArgumentsView: View { var body: some View { VStack { - Table(of: QEMUArgument.self, selection: $selected) { - TableColumn("Arguments") { arg in - let customSelected = selected.intersection(customUuids) - if fixedUuids.contains(arg.id) || customSelected.count > 1 || !customSelected.contains(arg.id) { - Text(arg.string) - .foregroundColor(fixedUuids.contains(arg.id) ? .secondary : .primary) - .textSelection(.enabled) - } else { - TextField("", text: $selectedArgument.string) - .focused($focused, equals: arg.id) - .onSubmit(of: .text) { - if let index = config.additionalArguments.firstIndex(of: arg) { - config.additionalArguments[index] = selectedArgument - } - } - } - } - } rows: { - ForEach(fixedArguments) { arg in - TableRow(arg) - } - ForEach(config.additionalArguments) { arg in - TableRow(arg) - } - }.onChange(of: selected) { newValue in - // save changes to last selected argument - if let index = config.additionalArguments.firstIndex(where: { $0.id == selectedArgument.id }) { - config.additionalArguments[index] = selectedArgument - selectedArgument = .init("") - } - // get new selected argument - if let selectedId = selected.intersection(customUuids).first { - if let arg = config.additionalArguments.first(where: { $0.id == selectedId }) { - selectedArgument = arg - } - } - } Spacer() - HStack { - Button { - showExportArgs.toggle() - } label: { - Text("Export QEMU Command…") - }.help("Export all arguments as a text file. This is only for debugging purposes as UTM's built-in QEMU differs from upstream QEMU in supported arguments.") - Spacer() - let customSelected = selected.intersection(customUuids) - if !customSelected.isEmpty { - if customSelected.count > 1 || customSelected.first != config.additionalArguments.first?.id { - Button { - for i in 1.. 1 || customSelected.first != config.additionalArguments.last?.id { - Button { - for i in (0..