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
9a2bd0d9
Commit
9a2bd0d9
authored
Sep 09, 2011
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Persistence fixes
parent
98f17071
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
configuration.h
src/configuration.h
+1
-1
MainWindow.cc
src/ui/MainWindow.cc
+23
-19
No files found.
src/configuration.h
View file @
9a2bd0d9
...
...
@@ -12,7 +12,7 @@
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_APPLICATION_VERSION "v. 0.9.
2 (Alpha RC1
)"
#define QGC_APPLICATION_VERSION "v. 0.9.
0 (Alpha RC4
)"
namespace
QGC
...
...
src/ui/MainWindow.cc
View file @
9a2bd0d9
...
...
@@ -210,9 +210,6 @@ MainWindow::MainWindow(QWidget *parent):
MainWindow
::~
MainWindow
()
{
// Store settings
storeSettings
();
delete
mavlink
;
delete
joystick
;
...
...
@@ -629,6 +626,7 @@ void MainWindow::showCentralWidget()
void
MainWindow
::
closeEvent
(
QCloseEvent
*
event
)
{
if
(
isVisible
())
storeViewState
();
storeSettings
();
aboutToCloseFlag
=
true
;
mavlink
->
storeSettings
();
...
...
@@ -752,6 +750,8 @@ void MainWindow::storeSettings()
settings
.
setValue
(
"AUTO_RECONNECT"
,
autoReconnect
);
settings
.
setValue
(
"CURRENT_STYLE"
,
currentStyle
);
settings
.
endGroup
();
if
(
!
aboutToCloseFlag
&&
isVisible
())
{
settings
.
setValue
(
getWindowGeometryKey
(),
saveGeometry
());
// Save the last current view in any case
settings
.
setValue
(
"CURRENT_VIEW"
,
currentView
);
...
...
@@ -760,6 +760,7 @@ void MainWindow::storeSettings()
// Save the current view only if a UAS is connected
if
(
UASManager
::
instance
()
->
getUASList
().
length
()
>
0
)
settings
.
setValue
(
"CURRENT_VIEW_WITH_UAS_CONNECTED"
,
currentView
);
// Save the current power mode
}
settings
.
setValue
(
"LOW_POWER_MODE"
,
lowPowerMode
);
settings
.
sync
();
}
...
...
@@ -1314,6 +1315,8 @@ void MainWindow::UASCreated(UASInterface* uas)
*/
void
MainWindow
::
storeViewState
()
{
if
(
!
aboutToCloseFlag
)
{
// Save current state
settings
.
setValue
(
getWindowStateKey
(),
saveState
(
QGC
::
applicationVersion
()));
settings
.
setValue
(
getWindowStateKey
()
+
"CENTER_WIDGET"
,
centerStack
->
currentIndex
());
...
...
@@ -1322,6 +1325,7 @@ void MainWindow::storeViewState()
// perspective.
windowStateVal
=
this
->
windowState
();
settings
.
setValue
(
getWindowGeometryKey
(),
saveGeometry
());
}
}
void
MainWindow
::
loadViewState
()
...
...
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