Browse Source

Merge pull request #7939 from mavlink/pr_link_name

Persist link name when switching types.
QGC4.4
Gus Grubba 6 years ago committed by GitHub
parent
commit
753f36a072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/comm/LinkManager.cc
  2. 3
      src/ui/preferences/LinkSettings.qml

1
src/comm/LinkManager.cc

@ -762,6 +762,7 @@ bool LinkManager::endConfigurationEditing(LinkConfiguration* config, LinkConfigu @@ -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 {

3
src/ui/preferences/LinkSettings.qml

@ -67,7 +67,6 @@ Rectangle { @@ -67,7 +67,6 @@ Rectangle {
text: object.name
exclusiveGroup: linkGroup
visible: !object.dynamic
onClicked: {
checked = true
_currentSelection = object
@ -275,7 +274,7 @@ Rectangle { @@ -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

Loading…
Cancel
Save