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
aa7b4b45
Commit
aa7b4b45
authored
May 19, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up waypoint handling to not flicker on current WP change state
parent
3517b6ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
Waypoint.cc
src/Waypoint.cc
+2
-1
UASWaypointManager.cc
src/uas/UASWaypointManager.cc
+1
-1
WaypointEditableView.cc
src/ui/WaypointEditableView.cc
+13
-4
No files found.
src/Waypoint.cc
View file @
aa7b4b45
...
...
@@ -216,7 +216,8 @@ void Waypoint::setCurrent(bool current)
if
(
this
->
current
!=
current
)
{
this
->
current
=
current
;
emit
changed
(
this
);
// The current waypoint index is handled by the list
// and not part of the individual waypoint update state
}
}
...
...
src/uas/UASWaypointManager.cc
View file @
aa7b4b45
...
...
@@ -347,7 +347,7 @@ int UASWaypointManager::setCurrentEditable(quint16 seq)
if
(
seq
<
waypointsEditable
.
count
())
{
if
(
current_state
==
WP_IDLE
)
{
//update local main storage
for
(
int
i
=
0
;
i
<
waypointsEditable
.
count
();
i
++
)
{
for
(
int
i
=
0
;
i
<
waypointsEditable
.
count
();
i
++
)
{
if
(
waypointsEditable
[
i
]
->
getId
()
==
seq
)
{
waypointsEditable
[
i
]
->
setCurrent
(
true
);
}
else
{
...
...
src/ui/WaypointEditableView.cc
View file @
aa7b4b45
...
...
@@ -369,7 +369,10 @@ void WaypointEditableView::changedCurrent(int state)
else
{
wp
->
setCurrent
(
true
);
emit
changeCurrentWaypoint
(
wp
->
getId
());
//the slot changeCurrentWaypoint() in WaypointList sets all other current flags to false
// At this point we do not consider this signal
// to be valid / the edit check boxes should not change the view state
//emit changeCurrentWaypoint(wp->getId());
//the slot changeCurrentWaypoint() in WaypointList sets all other current flags to false
}
}
...
...
@@ -485,7 +488,10 @@ void WaypointEditableView::updateValues()
if
(
m_ui
->
selectedBox
->
isChecked
()
!=
wp
->
getCurrent
())
{
// This is never a reason to emit a changed signal
m_ui
->
selectedBox
->
blockSignals
(
true
);
m_ui
->
selectedBox
->
setChecked
(
wp
->
getCurrent
());
m_ui
->
selectedBox
->
blockSignals
(
false
);
}
if
(
m_ui
->
autoContinue
->
isChecked
()
!=
wp
->
getAutoContinue
())
{
...
...
@@ -578,9 +584,12 @@ void WaypointEditableView::updateValues()
void
WaypointEditableView
::
setCurrent
(
bool
state
)
{
m_ui
->
selectedBox
->
blockSignals
(
true
);
m_ui
->
selectedBox
->
setChecked
(
state
);
m_ui
->
selectedBox
->
blockSignals
(
false
);
if
(
m_ui
->
selectedBox
->
isChecked
()
!=
state
)
{
m_ui
->
selectedBox
->
blockSignals
(
true
);
m_ui
->
selectedBox
->
setChecked
(
state
);
m_ui
->
selectedBox
->
blockSignals
(
false
);
}
}
...
...
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