1
0
Fork 0

Fix re-selection of start location.

This commit is contained in:
James Turner 2016-08-21 10:36:54 -05:00
parent 904bb74036
commit 3c4542fba6

View file

@ -995,8 +995,12 @@ void LocationWidget::onShowHistory()
void LocationWidget::setBaseLocation(FGPositionedRef ref) void LocationWidget::setBaseLocation(FGPositionedRef ref)
{ {
m_locationIsLatLon = false; m_locationIsLatLon = false;
if (m_location == ref) // don't change location if we're on the same location. We must check
// the current stack index, otherwise there's no way back into the same
// location after using the back button.
if ((m_location == ref) && (m_ui->stack->currentIndex() != 2)) {
return; return;
}
m_location = ref; m_location = ref;
onLocationChanged(); onLocationChanged();