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
dab97bcc
Commit
dab97bcc
authored
8 years ago
by
Don Gagne
Committed by
GitHub
8 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4645 from DonLakeFlyer/IndoorPalette
Fix indoorPalette overriding
parents
da928b1b
7a89279c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
AppSettings.cc
src/Settings/AppSettings.cc
+3
-11
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+12
-1
No files found.
src/Settings/AppSettings.cc
View file @
dab97bcc
...
...
@@ -47,15 +47,7 @@ AppSettings::AppSettings(QObject* parent)
{
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
AppSettings
>
(
"QGroundControl.SettingsManager"
,
1
,
0
,
"AppSettings"
,
"Reference only"
);
// Set up correct default for palette setting
QVariant
outdoorPalette
;
#if defined (__mobile__)
outdoorPalette
=
0
;
#else
outdoorPalette
=
1
;
#endif
_nameToMetaDataMap
[
indoorPaletteName
]
->
setRawDefaultValue
(
outdoorPalette
);
QGCPalette
::
setGlobalTheme
(
indoorPalette
()
->
rawValue
().
toBool
()
?
QGCPalette
::
Dark
:
QGCPalette
::
Light
);
}
Fact
*
AppSettings
::
offlineEditingFirmwareType
(
void
)
...
...
@@ -177,5 +169,5 @@ Fact* AppSettings::indoorPalette(void)
void
AppSettings
::
_indoorPaletteChanged
(
void
)
{
qgcApp
()
->
_loadCurrentStyleSheet
();
QGCPalette
::
setGlobalTheme
(
_indoorPaletteFact
->
rawValue
().
toBool
()
?
QGCPalette
::
Dark
:
QGCPalette
::
Light
);
QGCPalette
::
setGlobalTheme
(
indoorPalette
()
->
rawValue
().
toBool
()
?
QGCPalette
::
Dark
:
QGCPalette
::
Light
);
}
This diff is collapsed.
Click to expand it.
src/api/QGCCorePlugin.cc
View file @
dab97bcc
...
...
@@ -11,6 +11,7 @@
#include "QGCOptions.h"
#include "QGCSettings.h"
#include "FactMetaData.h"
#include "SettingsManager.h"
#include <QtQml>
#include <QQmlEngine>
...
...
@@ -164,6 +165,16 @@ bool QGCCorePlugin::overrideSettingsGroupVisibility(QString name)
bool
QGCCorePlugin
::
adjustSettingMetaData
(
FactMetaData
&
metaData
)
{
Q_UNUSED
(
metaData
);
// No mods to standard meta data
if
(
metaData
.
name
()
==
AppSettings
::
indoorPaletteName
)
{
// Set up correct default for palette setting
QVariant
outdoorPalette
;
#if defined (__mobile__)
outdoorPalette
=
0
;
#else
outdoorPalette
=
1
;
#endif
metaData
.
setRawDefaultValue
(
outdoorPalette
);
}
return
true
;
// Show setting in ui
}
This diff is collapsed.
Click to expand it.
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