added reset in or out point

This commit is contained in:
itsmattkc
2019-01-11 00:24:09 +11:00
parent a00b14e13c
commit 0b0aaa3218
4 changed files with 37 additions and 0 deletions
+19
View File
@@ -245,6 +245,9 @@ void MainWindow::make_new_menu(QMenu *parent) {
void MainWindow::make_inout_menu(QMenu *parent) {
parent->addAction("Set In Point", this, SLOT(set_in_point()), QKeySequence("I"));
parent->addAction("Set Out Point", this, SLOT(set_out_point()), QKeySequence("O"));
parent->addSeparator();
parent->addAction("Reset In Point", this, SLOT(clear_in()));
parent->addAction("Reset Out Point", this, SLOT(clear_out()));
parent->addAction("Clear In/Out Point", this, SLOT(clear_inout()), QKeySequence("G"));
}
@@ -1212,6 +1215,22 @@ void MainWindow::set_out_point() {
}
}
void MainWindow::clear_in() {
if (panel_timeline->focused() || panel_sequence_viewer->is_focused()) {
panel_sequence_viewer->clear_in();
} else if (panel_footage_viewer->is_focused()) {
panel_footage_viewer->clear_in();
}
}
void MainWindow::clear_out() {
if (panel_timeline->focused() || panel_sequence_viewer->is_focused()) {
panel_sequence_viewer->clear_out();
} else if (panel_footage_viewer->is_focused()) {
panel_footage_viewer->clear_out();
}
}
void MainWindow::clear_inout() {
if (panel_timeline->focused() || panel_sequence_viewer->is_focused()) {
panel_sequence_viewer->clear_inout_point();
+2
View File
@@ -98,6 +98,8 @@ private slots:
void set_in_point();
void set_out_point();
void clear_in();
void clear_out();
void clear_inout();
void delete_inout();
void ripple_delete_inout();
+14
View File
@@ -431,6 +431,20 @@ void Viewer::update_viewer() {
update_end_timecode();
}
void Viewer::clear_in() {
if (seq->using_workarea) {
undo_stack.push(new SetTimelineInOutCommand(seq, true, 0, seq->workarea_out));
update_parents();
}
}
void Viewer::clear_out() {
if (seq->using_workarea) {
undo_stack.push(new SetTimelineInOutCommand(seq, true, seq->workarea_in, seq->getEndFrame()));
update_parents();
}
}
void Viewer::clear_inout_point() {
if (seq->using_workarea) {
undo_stack.push(new SetTimelineInOutCommand(seq, false, 0, 0));
+2
View File
@@ -37,6 +37,8 @@ public:
void update_end_timecode();
void update_header_zoom();
void update_viewer();
void clear_in();
void clear_out();
void clear_inout_point();
void set_in_point();
void set_out_point();