Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1d000e14
Commit
1d000e14
authored
Feb 25, 2020
by
DoinLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
59b5fc31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ComplexMissionItem.cc
src/MissionManager/ComplexMissionItem.cc
+7
-1
QGCOptions.h
src/api/QGCOptions.h
+2
-0
No files found.
src/MissionManager/ComplexMissionItem.cc
View file @
1d000e14
...
...
@@ -9,6 +9,8 @@
#include "ComplexMissionItem.h"
#include "QGCApplication.h"
#include "QGCCorePlugin.h"
#include "QGCOptions.h"
#include <QSettings>
...
...
@@ -54,8 +56,12 @@ void ComplexMissionItem::savePreset(const QString& name)
void
ComplexMissionItem
::
deletePreset
(
const
QString
&
name
)
{
QSettings
settings
;
if
(
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
options
()
->
surveyBuiltInPresetNames
().
contains
(
name
))
{
qgcApp
()
->
showMessage
(
tr
(
"'%1' is a built-in preset which cannot be deleted."
).
arg
(
name
));
return
;
}
QSettings
settings
;
settings
.
beginGroup
(
presetsSettingsGroup
());
settings
.
beginGroup
(
_presetSettingsKey
);
settings
.
remove
(
name
);
...
...
src/api/QGCOptions.h
View file @
1d000e14
...
...
@@ -67,6 +67,7 @@ public:
Q_PROPERTY
(
bool
enableMultiVehicleList
READ
enableMultiVehicleList
CONSTANT
)
Q_PROPERTY
(
bool
enableMapScale
READ
enableMapScale
CONSTANT
)
Q_PROPERTY
(
bool
enableSaveMainWindowPosition
READ
enableSaveMainWindowPosition
CONSTANT
)
Q_PROPERTY
(
QStringList
surveyBuiltInPresetNames
READ
surveyBuiltInPresetNames
CONSTANT
)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
...
...
@@ -130,6 +131,7 @@ public:
virtual
bool
enableMapScale
()
const
{
return
true
;
}
/// Desktop builds save the main application size and position on close (and restore it on open)
virtual
bool
enableSaveMainWindowPosition
()
const
{
return
true
;
}
virtual
QStringList
surveyBuiltInPresetNames
()
const
{
return
QStringList
();
}
// Built in presets cannot be deleted
#if defined(__mobile__)
virtual
bool
useMobileFileDialog
()
const
{
return
true
;}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment