Skip to content

Commit ffd8fe3

Browse files
authored
Merge pull request #1657 from Karry/unfollow-vehicle-fix
do not (always) reset input handler when un-follow vehicle
2 parents 0fb7232 + a2b0026 commit ffd8fe3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libosmscout-client-qt/src/osmscoutclientqt/MapWidget.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void MapWidget::setupInputHandler(InputHandler *newGesture)
200200
if (locked != inputHandler->isLockedToPosition()){
201201
emit lockToPositionChanged();
202202
}
203-
//qDebug() << "Input handler changed (" << (newGesture->animationInProgress()? "animation": "stationary") << ")";
203+
// qDebug() << "Input handler changed to" << inputHandler->metaObject()->className();
204204
}
205205

206206
void MapWidget::redraw()
@@ -607,7 +607,9 @@ void MapWidget::setFollowVehicle(bool follow){
607607
setupInputHandler(new VehicleFollowHandler(*view, QSizeF(width(), height())));
608608
}
609609
}else{
610-
setupInputHandler(new InputHandler(*view));
610+
if (inputHandler->isFollowVehicle()) {
611+
setupInputHandler(new InputHandler(*view));
612+
}
611613
}
612614
}
613615

0 commit comments

Comments
 (0)