Removed Transform::needsTransition()
Transform::updateTransitions() already checks if there is a callback to update transitions.
This commit is contained in:
@@ -73,11 +73,11 @@ bool Map::renderSync() {
|
||||
}
|
||||
|
||||
void Map::nudgeTransitions(bool forceRerender) {
|
||||
if (transform->needsTransition()) {
|
||||
update(Update(transform->updateTransitions(Clock::now())));
|
||||
} else if (forceRerender) {
|
||||
update();
|
||||
UpdateType update_ = transform->updateTransitions(Clock::now());
|
||||
if (forceRerender) {
|
||||
update_ |= static_cast<UpdateType>(Update::Repaint);
|
||||
}
|
||||
update(Update(update_));
|
||||
}
|
||||
|
||||
void Map::update(Update update_) {
|
||||
|
||||
@@ -377,10 +377,6 @@ void Transform::startTransition(std::function<Update(double)> frame,
|
||||
transitionFinishFn = finish;
|
||||
}
|
||||
|
||||
bool Transform::needsTransition() const {
|
||||
return !!transitionFrameFn;
|
||||
}
|
||||
|
||||
UpdateType Transform::updateTransitions(const TimePoint& now) {
|
||||
return static_cast<UpdateType>(transitionFrameFn ? transitionFrameFn(now) : Update::Nothing);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ public:
|
||||
double getAngle() const;
|
||||
|
||||
// Transitions
|
||||
bool needsTransition() const;
|
||||
UpdateType updateTransitions(const TimePoint& now);
|
||||
void cancelTransitions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user