Merge branch 'move-time-to-viewer'
This commit is contained in:
@@ -151,7 +151,7 @@ bool SeekableWidget::PasteMarkers()
|
||||
for (auto it=markers.cbegin(); it!=markers.cend(); it++) {
|
||||
min = std::min(min, (*it)->time().in());
|
||||
}
|
||||
min -= GetTime();
|
||||
min -= GetViewerNode()->GetPlayhead();
|
||||
|
||||
for (auto it=markers.cbegin(); it!=markers.cend(); it++) {
|
||||
TimelineMarker *m = *it;
|
||||
@@ -391,10 +391,8 @@ void SeekableWidget::SeekToScenePoint(qreal scene)
|
||||
playhead_time += movement;
|
||||
}
|
||||
|
||||
if (playhead_time != GetTime()) {
|
||||
SetTime(playhead_time);
|
||||
|
||||
emit TimeChanged(playhead_time);
|
||||
if (playhead_time != GetViewerNode()->GetPlayhead()) {
|
||||
GetViewerNode()->SetPlayhead(playhead_time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ void TimeRuler::drawForeground(QPainter *p, const QRectF &rect)
|
||||
}
|
||||
|
||||
// Draw the playhead if it's on screen at the moment
|
||||
int playhead_pos = TimeToScene(GetTime());
|
||||
int playhead_pos = TimeToScene(GetViewerNode()->GetPlayhead());
|
||||
p->setPen(Qt::NoPen);
|
||||
p->setBrush(PLAYHEAD_COLOR);
|
||||
DrawPlayhead(p, playhead_pos, line_bottom);
|
||||
|
||||
Reference in New Issue
Block a user