1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

stop smooth scroll when using window borders to scroll

This commit is contained in:
Laserlicht
2023-12-09 17:29:57 +01:00
committed by GitHub
parent 6917e33ec3
commit b8e40978a0

View File

@@ -122,8 +122,11 @@ void MapView::onMapLevelSwitched()
void MapView::onMapScrolled(const Point & distance) void MapView::onMapScrolled(const Point & distance)
{ {
if(!isGesturing()) if(!isGesturing())
{
postSwipeSpeed = 0.0;
controller->setViewCenter(model->getMapViewCenter() + distance, model->getLevel()); controller->setViewCenter(model->getMapViewCenter() + distance, model->getLevel());
} }
}
void MapView::onMapSwiped(const Point & viewPosition) void MapView::onMapSwiped(const Point & viewPosition)
{ {