Browse Source

Merge pull request #6392 from DonLakeFlyer/SettingsItemBug

Don't allow user to add settings item command
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
0ec73ab96d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/MissionManager/MissionCommandTree.cc

5
src/MissionManager/MissionCommandTree.cc

@ -239,6 +239,11 @@ QVariantList MissionCommandTree::getCommandsForCategory(Vehicle* vehicle, const @@ -239,6 +239,11 @@ QVariantList MissionCommandTree::getCommandsForCategory(Vehicle* vehicle, const
QVariantList list;
QMap<MAV_CMD, MissionCommandUIInfo*> commandMap = _availableCommands[baseFirmwareType][baseVehicleType];
foreach (MAV_CMD command, commandMap.keys()) {
if (command == MAV_CMD_NAV_LAST) {
// MAV_CMD_NAV_LAST is used for Mission Settings item. Although we want to be able to get command info for it.
// The user should not be able to use it as a command.
continue;
}
MissionCommandUIInfo* uiInfo = commandMap[command];
if (uiInfo->category() == category || category == _allCommandsCategory) {
list.append(QVariant::fromValue(uiInfo));

Loading…
Cancel
Save