timebased: only snap to workarea if enabled

Fixes #2106
This commit is contained in:
itsmattkc
2022-11-18 10:30:18 -08:00
parent 9a0e16f504
commit b33260dce8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -828,7 +828,7 @@ bool TimeBasedWidget::SnapPoint(const std::vector<rational> &start_times, ration
}
}
if ((snap_points & kSnapToWorkarea) && ruler()->GetWorkArea()) {
if ((snap_points & kSnapToWorkarea) && ruler()->GetWorkArea() && ruler()->GetWorkArea()->enabled()) {
const rational &workarea_in = ruler()->GetWorkArea()->in();
const rational &workarea_out = ruler()->GetWorkArea()->out();
+1 -1
View File
@@ -491,7 +491,7 @@ bool SeekableWidget::FindResizeHandle(QMouseEvent *event)
rational max = SceneToTimeNoGrid(scene.x() + border);
// Test for workarea
if (workarea_) {
if (workarea_ && workarea_->enabled()) {
if (workarea_->in() >= min && workarea_->in() < max) {
resize_mode_ = kResizeIn;
} else if (workarea_->out() >= min && workarea_->out() < max) {