Skip to content

Commit

Permalink
Add setting to show Presets tab first
Browse files Browse the repository at this point in the history
  • Loading branch information
Don Gagne committed Sep 29, 2019
1 parent 83f994c commit 0120485
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Settings/PlanView.SettingsGroup.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[
{
"name": "displayPresetsTabFirst",
"shortDescription": "Display the presets tab at start",
"type": "bool",
"defaultValue": false
}
]
2 changes: 2 additions & 0 deletions src/Settings/PlanViewSettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ DECLARE_SETTINGGROUP(PlanView, "PlanView")
{
qmlRegisterUncreatableType<PlanViewSettings>("QGroundControl.SettingsManager", 1, 0, "PlanViewSettings", "Reference only"); \
}

DECLARE_SETTINGSFACT(PlanViewSettings, displayPresetsTabFirst)
6 changes: 4 additions & 2 deletions src/Settings/PlanViewSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class PlanViewSettings : public SettingsGroup
public:
PlanViewSettings(QObject* parent = nullptr);
DEFINE_SETTING_NAME_GROUP()
// This is currently only used to set custom build visibility of the Plan view settings ui.
// The settings themselves related to PlanView are in still in AppSettings due to historical reasons.

// Most individual settings related to PlanView are still in AppSettings due to historical reasons.

DEFINE_SETTINGFACT(displayPresetsTabFirst)
};

0 comments on commit 0120485

Please sign in to comment.