Commit 55175ff0 authored by Gus Grubba's avatar Gus Grubba

Persist link name when switching types.

parent 97a9a79a
...@@ -762,6 +762,7 @@ bool LinkManager::endConfigurationEditing(LinkConfiguration* config, LinkConfigu ...@@ -762,6 +762,7 @@ bool LinkManager::endConfigurationEditing(LinkConfiguration* config, LinkConfigu
saveLinkConfigurationList(); saveLinkConfigurationList();
// Tell link about changes (if any) // Tell link about changes (if any)
config->updateSettings(); config->updateSettings();
emit config->nameChanged(config->name());
// Discard temporary duplicate // Discard temporary duplicate
delete editedConfig; delete editedConfig;
} else { } else {
......
...@@ -67,7 +67,6 @@ Rectangle { ...@@ -67,7 +67,6 @@ Rectangle {
text: object.name text: object.name
exclusiveGroup: linkGroup exclusiveGroup: linkGroup
visible: !object.dynamic visible: !object.dynamic
onClicked: { onClicked: {
checked = true checked = true
_currentSelection = object _currentSelection = object
...@@ -275,7 +274,7 @@ Rectangle { ...@@ -275,7 +274,7 @@ Rectangle {
linkSettingLoader.source = "" linkSettingLoader.source = ""
linkSettingLoader.visible = false linkSettingLoader.visible = false
// Save current name // Save current name
var name = editConfig.name var name = nameField.text
// Discard link configuration (old type) // Discard link configuration (old type)
QGroundControl.linkManager.cancelConfigurationEditing(editConfig) QGroundControl.linkManager.cancelConfigurationEditing(editConfig)
// Create new link configuration // Create new link configuration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment