From 55175ff0f5e8c8329a9e3f019e196db832fc2fac Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Sun, 20 Oct 2019 09:38:29 -0400 Subject: [PATCH] Persist link name when switching types. --- src/comm/LinkManager.cc | 1 + src/ui/preferences/LinkSettings.qml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 7ca89eb..9914b97 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -762,6 +762,7 @@ bool LinkManager::endConfigurationEditing(LinkConfiguration* config, LinkConfigu saveLinkConfigurationList(); // Tell link about changes (if any) config->updateSettings(); + emit config->nameChanged(config->name()); // Discard temporary duplicate delete editedConfig; } else { diff --git a/src/ui/preferences/LinkSettings.qml b/src/ui/preferences/LinkSettings.qml index f02c9e4..9db7d6a 100644 --- a/src/ui/preferences/LinkSettings.qml +++ b/src/ui/preferences/LinkSettings.qml @@ -67,7 +67,6 @@ Rectangle { text: object.name exclusiveGroup: linkGroup visible: !object.dynamic - onClicked: { checked = true _currentSelection = object @@ -275,7 +274,7 @@ Rectangle { linkSettingLoader.source = "" linkSettingLoader.visible = false // Save current name - var name = editConfig.name + var name = nameField.text // Discard link configuration (old type) QGroundControl.linkManager.cancelConfigurationEditing(editConfig) // Create new link configuration