timeruler: add ability to resize markers and workarea
This commit is contained in:
@@ -195,8 +195,26 @@ public:
|
||||
rational time_diff = view_->SceneToTimeNoGrid(view_->mapToScene(event->pos()).x() - drag_mouse_start_.x());
|
||||
|
||||
// Snap points
|
||||
rational presnap_time_diff = time_diff;
|
||||
SnapPoints(&time_diff);
|
||||
|
||||
// Validate snapping
|
||||
if (Core::instance()->snapping() && view_->GetSnapService()) {
|
||||
for (size_t i=0; i<selected_.size(); i++) {
|
||||
rational proposed_time = dragging_.at(i) + time_diff;
|
||||
T *sel = selected_.at(i);
|
||||
|
||||
if (sel->has_sibling_at_time(proposed_time)) {
|
||||
// Unsnap
|
||||
time_diff = presnap_time_diff;
|
||||
if (view_->GetSnapService()) {
|
||||
view_->GetSnapService()->HideSnaps();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate movement
|
||||
for (size_t i=0; i<selected_.size(); i++) {
|
||||
rational proposed_time = dragging_.at(i) + time_diff;
|
||||
|
||||
Reference in New Issue
Block a user