If we stop following compass, map vertex should points to north.

This commit is contained in:
kirillcpp 2012-12-07 15:34:44 +03:00 committed by Alex Zolotarev
parent b19a7cc0f9
commit 5df091bbb3

View file

@ -10,6 +10,8 @@
#import "../../Common/CustomAlertView.h"
#include "../../../anim/controller.hpp"
#include "../../../gui/controller.hpp"
#include "../../../platform/platform.hpp"
@ -145,7 +147,23 @@
return;
}
else
{
ls->StopCompassFollowing();
anim::Controller *animController = f.GetAnimController();
animController->Lock();
/// switching off compass follow mode
f.GetInformationDisplay().locationState()->StopCompassFollowing();
double startAngle = f.GetNavigator().Screen().GetAngle();
double endAngle = 0;
f.GetAnimator().RotateScreen(startAngle, endAngle);
animController->Unlock();
f.Invalidate();
}
}
}
}