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
00ea831b
Commit
00ea831b
authored
Jan 17, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
93d38743
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
Fact.cc
src/FactSystem/Fact.cc
+13
-2
Fact.h
src/FactSystem/Fact.h
+5
-0
ScreenTools.qml
src/QmlControls/ScreenTools.qml
+2
-0
MainWindow.cc
src/ui/MainWindow.cc
+1
-1
No files found.
src/FactSystem/Fact.cc
View file @
00ea831b
...
...
@@ -27,6 +27,7 @@ Fact::Fact(QObject* parent)
,
_sendValueChangedSignals
(
true
)
,
_deferredValueChangeSignal
(
false
)
,
_valueSliderModel
(
nullptr
)
,
_ignoreQGCRebootRequired
(
false
)
{
FactMetaData
*
metaData
=
new
FactMetaData
(
_type
,
this
);
setMetaData
(
metaData
);
...
...
@@ -44,6 +45,7 @@ Fact::Fact(int componentId, QString name, FactMetaData::ValueType_t type, QObjec
,
_sendValueChangedSignals
(
true
)
,
_deferredValueChangeSignal
(
false
)
,
_valueSliderModel
(
nullptr
)
,
_ignoreQGCRebootRequired
(
false
)
{
FactMetaData
*
metaData
=
new
FactMetaData
(
_type
,
this
);
setMetaData
(
metaData
);
...
...
@@ -61,6 +63,7 @@ Fact::Fact(const QString& settingsGroup, FactMetaData* metaData, QObject* parent
,
_sendValueChangedSignals
(
true
)
,
_deferredValueChangeSignal
(
false
)
,
_valueSliderModel
(
nullptr
)
,
_ignoreQGCRebootRequired
(
false
)
{
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
adjustSettingMetaData
(
settingsGroup
,
*
metaData
);
setMetaData
(
metaData
,
true
/* setDefaultFromMetaData */
);
...
...
@@ -90,7 +93,8 @@ const Fact& Fact::operator=(const Fact& other)
_type
=
other
.
_type
;
_sendValueChangedSignals
=
other
.
_sendValueChangedSignals
;
_deferredValueChangeSignal
=
other
.
_deferredValueChangeSignal
;
_valueSliderModel
=
nullptr
;
_valueSliderModel
=
nullptr
;
_ignoreQGCRebootRequired
=
other
.
_ignoreQGCRebootRequired
;
if
(
_metaData
&&
other
.
_metaData
)
{
*
_metaData
=
*
other
.
_metaData
;
}
else
{
...
...
@@ -615,7 +619,9 @@ bool Fact::vehicleRebootRequired(void) const
bool
Fact
::
qgcRebootRequired
(
void
)
const
{
if
(
_metaData
)
{
if
(
_ignoreQGCRebootRequired
)
{
return
false
;
}
else
if
(
_metaData
)
{
return
_metaData
->
qgcRebootRequired
();
}
else
{
qWarning
()
<<
kMissingMetadata
<<
name
();
...
...
@@ -743,3 +749,8 @@ void Fact::_checkForRebootMessaging(void)
}
}
}
void
Fact
::
_setIgnoreQGCRebootRequired
(
bool
ignore
)
{
_ignoreQGCRebootRequired
=
ignore
;
}
src/FactSystem/Fact.h
View file @
00ea831b
...
...
@@ -129,6 +129,10 @@ public:
bool
writeOnly
(
void
)
const
;
bool
volatileValue
(
void
)
const
;
// Internal hack to allow changes to fact which do not signal reboot. Currently used by font point size
// code in ScreenTools.qml to set initial sizing at first boot.
Q_INVOKABLE
void
_setIgnoreQGCRebootRequired
(
bool
ignore
);
Q_INVOKABLE
FactValueSliderListModel
*
valueSliderModel
(
void
);
/// Returns the values as a string with full 18 digit precision if float/double.
...
...
@@ -208,6 +212,7 @@ protected:
bool
_sendValueChangedSignals
;
bool
_deferredValueChangeSignal
;
FactValueSliderListModel
*
_valueSliderModel
;
bool
_ignoreQGCRebootRequired
;
};
#endif
src/QmlControls/ScreenTools.qml
View file @
00ea831b
...
...
@@ -181,7 +181,9 @@ Item {
}
else
{
baseSize
=
_defaultFont
.
font
.
pointSize
;
}
_appFontPointSizeFact
.
_setIgnoreQGCRebootRequired
(
true
)
_appFontPointSizeFact
.
value
=
baseSize
_appFontPointSizeFact
.
_setIgnoreQGCRebootRequired
(
false
)
//-- Release build doesn't get signal
if
(
!
ScreenToolsController
.
isDebug
)
_screenTools
.
_setBasePointSize
(
baseSize
);
...
...
src/ui/MainWindow.cc
View file @
00ea831b
...
...
@@ -504,7 +504,7 @@ void MainWindow::_storeVisibleWidgetsSettings(void)
QObject
*
MainWindow
::
rootQmlObject
(
void
)
{
return
_mainQmlWidgetHolder
->
getRootObject
()
;
return
_mainQmlWidgetHolder
?
_mainQmlWidgetHolder
->
getRootObject
()
:
nullptr
;
}
void
MainWindow
::
_showAdvancedUIChanged
(
bool
advanced
)
...
...
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