moved playback functions to viewer

This commit is contained in:
itsmattkc
2018-10-14 21:16:58 +11:00
parent 3c69c69ccd
commit 21776786f2
12 changed files with 142 additions and 126 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ void TimelineHeader::set_playhead(int mouse_x) {
long frame = getHeaderFrameFromScreenPoint(mouse_x);
if (snapping) panel_timeline->snap_to_timeline(&frame, false, true, true);
if (frame != sequence->playhead) {
panel_timeline->seek(frame);
viewer->seek(frame);
}
}
+3
View File
@@ -4,6 +4,7 @@
#include <QWidget>
#include <QFontMetrics>
class QScrollArea;
class Viewer;
class TimelineHeader : public QWidget
{
@@ -13,6 +14,8 @@ public:
void set_in_point(long p);
void set_out_point(long p);
Viewer* viewer;
bool snapping;
void show_text(bool enable);
+3 -3
View File
@@ -653,7 +653,7 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
sequence->selections.append(s);
if (config.select_also_seeks) {
panel_timeline->seek(clip->timeline_in);
panel_sequence_viewer->seek(clip->timeline_in);
}
// if alt is not down, select links
@@ -686,7 +686,7 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
}
break;
case TIMELINE_TOOL_EDIT:
if (config.edit_tool_also_seeks) panel_timeline->seek(panel_timeline->drag_frame_start);
if (config.edit_tool_also_seeks) panel_sequence_viewer->seek(panel_timeline->drag_frame_start);
panel_timeline->selecting = true;
break;
case TIMELINE_TOOL_RAZOR:
@@ -1341,7 +1341,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
}
if (config.edit_tool_also_seeks) {
panel_timeline->seek(qMin(panel_timeline->drag_frame_start, panel_timeline->cursor_frame));
panel_sequence_viewer->seek(qMin(panel_timeline->drag_frame_start, panel_timeline->cursor_frame));
} else {
panel_timeline->repaint_timeline(false);
}
+1 -1
View File
@@ -453,7 +453,7 @@ void ViewerWidget::paintGL() {
// compose video preview
glClearColor(0, 0, 0, 0);
compose_sequence(NULL, (panel_timeline->playing || rendering));
compose_sequence(NULL, (panel_sequence_viewer->playing || rendering));
if (texture_failed) {
if (rendering) {