Merge GUI updates into macOS branch
# Conflicts: # src/GlobeWidget.cpp # src/GlobeWidget.h # src/MainWindow.h # src/MapWidget.cpp # src/MapWidget.h # src/RinexNavigation.cpp
This commit is contained in:
+13
-5
@@ -224,6 +224,11 @@ void MapWidget::clearCepMarker()
|
||||
update();
|
||||
}
|
||||
|
||||
QPointF MapWidget::centerCoordinate() const
|
||||
{
|
||||
return QPointF(m_centerLat, m_centerLon);
|
||||
}
|
||||
|
||||
void MapWidget::setAutoFollow(bool enabled)
|
||||
{
|
||||
if (m_autoFollow == enabled) {
|
||||
@@ -779,11 +784,14 @@ void MapWidget::disableAutoFollowFromUserAction()
|
||||
|
||||
int MapWidget::preferredFocusIndex() const
|
||||
{
|
||||
// Once corrected ESKF output is present, both camera and detail bubble
|
||||
// stay locked to its newest point. Raw GPS and truth records may arrive
|
||||
// later in an interleaved stream and must not pull the camera away.
|
||||
constexpr qint64 CorrectedPreferenceWindowMs = 1000;
|
||||
const int newestIndex = m_points.size() - 1;
|
||||
for (int index = m_points.size() - 1; index >= 0; --index) {
|
||||
if (m_points[index].source == LocationSource::ImuCorrected) return index;
|
||||
if (m_points[index].source == LocationSource::ImuCorrected) {
|
||||
const qint64 ageMs = m_points[index].receivedAt.msecsTo(
|
||||
m_points[newestIndex].receivedAt);
|
||||
return ageMs <= CorrectedPreferenceWindowMs ? index : newestIndex;
|
||||
}
|
||||
}
|
||||
return m_points.isEmpty() ? -1 : m_points.size() - 1;
|
||||
return newestIndex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user