Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
8c5fc409
Commit
8c5fc409
authored
Jul 06, 2014
by
Don Gagne
Browse files
Merge pull request #744 from DonLakeFlyer/OnboardFilesBug
Debounce misconfiguration, fix onboard files view
parents
d5e79d3a
ce05b1ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/MainWindow.cc
View file @
8c5fc409
...
@@ -822,7 +822,7 @@ void MainWindow::loadDockWidget(const QString& name)
...
@@ -822,7 +822,7 @@ void MainWindow::loadDockWidget(const QString& name)
}
}
else
if
(
name
==
"FILE_VIEW_DOCKWIDGET"
)
else
if
(
name
==
"FILE_VIEW_DOCKWIDGET"
)
{
{
createDockWidget
(
centerStack
->
currentWidget
(),
new
QGCUASFileViewMulti
(
this
),
tr
(
"Onboard Files"
),
"FILE_VIEW_DOCKWIDGET"
,
VIEW_ENGINEER
,
Qt
::
RightDockWidgetArea
);
createDockWidget
(
centerStack
->
currentWidget
(),
new
QGCUASFileViewMulti
(
this
),
tr
(
"Onboard Files"
),
"FILE_VIEW_DOCKWIDGET"
,
currentView
,
Qt
::
RightDockWidgetArea
);
}
}
else
if
(
name
==
"UAS_STATUS_DETAILS_DOCKWIDGET"
)
else
if
(
name
==
"UAS_STATUS_DETAILS_DOCKWIDGET"
)
{
{
...
@@ -1993,8 +1993,19 @@ void MainWindow::setAdvancedMode(bool isAdvancedMode)
...
@@ -1993,8 +1993,19 @@ void MainWindow::setAdvancedMode(bool isAdvancedMode)
settings
.
setValue
(
"ADVANCED_MODE"
,
isAdvancedMode
);
settings
.
setValue
(
"ADVANCED_MODE"
,
isAdvancedMode
);
}
}
void
MainWindow
::
handleMisconfiguration
(
UASInterface
*
uas
)
{
void
MainWindow
::
handleMisconfiguration
(
UASInterface
*
uas
)
{
static
QTime
lastTime
;
// We have to debounce this signal
if
(
!
lastTime
.
isValid
())
{
lastTime
.
start
();
}
else
{
if
(
lastTime
.
elapsed
()
<
10000
)
{
lastTime
.
start
();
return
;
}
}
// Ask user if he wants to handle this now
// Ask user if he wants to handle this now
QMessageBox
msgBox
(
this
);
QMessageBox
msgBox
(
this
);
msgBox
.
setIcon
(
QMessageBox
::
Information
);
msgBox
.
setIcon
(
QMessageBox
::
Information
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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