Merge branch 'master' into move-serialization
This commit is contained in:
@@ -254,6 +254,15 @@ bool KeyframeView::Paste(std::function<Node *(const QString &)> find_node_functi
|
||||
return false;
|
||||
}
|
||||
|
||||
void KeyframeView::CatchUpScrollEvent()
|
||||
{
|
||||
super::CatchUpScrollEvent();
|
||||
|
||||
if (this->selection_manager_.IsRubberBanding()) {
|
||||
this->selection_manager_.RubberBandMove(this->viewport()->mapFromGlobal(QCursor::pos()));
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeView::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
NodeKeyframe *key_under_cursor = selection_manager_.GetObjectAtPoint(event->pos());
|
||||
@@ -289,7 +298,7 @@ void KeyframeView::mouseMoveEvent(QMouseEvent *event)
|
||||
KeyframeDragMove(event, tip);
|
||||
selection_manager_.DragMove(event, tip);
|
||||
} else if (selection_manager_.IsRubberBanding()) {
|
||||
selection_manager_.RubberBandMove(event);
|
||||
selection_manager_.RubberBandMove(event->pos());
|
||||
Redraw();
|
||||
}
|
||||
|
||||
@@ -313,12 +322,13 @@ void KeyframeView::mouseReleaseEvent(QMouseEvent *event)
|
||||
selection_manager_.DragStop(command);
|
||||
KeyframeDragRelease(event, command);
|
||||
Core::instance()->undo_stack()->push(command);
|
||||
emit Released();
|
||||
} else if (selection_manager_.IsRubberBanding()) {
|
||||
selection_manager_.RubberBandStop();
|
||||
Redraw();
|
||||
emit SelectionChanged();
|
||||
}
|
||||
|
||||
emit Released();
|
||||
}
|
||||
|
||||
int BinarySearchFirstKeyframeAfterOrAt(const QVector<NodeKeyframe*> &keys, const rational &time)
|
||||
@@ -617,6 +627,13 @@ void KeyframeView::ShowKeyframePropertiesDialog()
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeView::UpdateRubberBandForScroll()
|
||||
{
|
||||
if (this->selection_manager_.IsRubberBanding()) {
|
||||
this->selection_manager_.RubberBandMove(this->viewport()->mapFromGlobal(QCursor::pos()));
|
||||
}
|
||||
}
|
||||
|
||||
void KeyframeView::Redraw()
|
||||
{
|
||||
viewport()->update();
|
||||
|
||||
Reference in New Issue
Block a user