diff --git a/mainwindow.cpp b/mainwindow.cpp index a51912876..cfc01e372 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -888,3 +888,40 @@ void MainWindow::on_actionEdit_to_In_Point_triggered() { void MainWindow::on_actionEdit_to_Out_Point_triggered() { if (panel_timeline->focused()) panel_timeline->ripple_to_in_point(false, false); } + +void MainWindow::on_actionNest_triggered() { + /* + if (sequence != NULL) { + QVector selected_clips; + long earliest_point = LONG_MAX; + for (int i=0;iclips.size();i++) { + Clip* c = sequence->clips.at(i); + if (c != NULL && panel_timeline->is_clip_selected(c, true)) { + selected_clips.append(c); + earliest_point = qMin(c->timeline_in, earliest_point); + + sequence->clips[i] = NULL; // make undoable + } + } + if (!selected_clips.isEmpty()) { + Sequence* s = new Sequence(); + + s->name = "NEST"; + s->width = sequence->width; + s->height = sequence->height; + s->frame_rate = sequence->frame_rate; + s->audio_frequency = sequence->audio_frequency; + s->audio_layout = sequence->audio_layout; + + for (int i=0;iclips.append(c); + } + + ComboAction* ca = new ComboAction(); + panel_project->new_sequence(ca, s, true, NULL); + undo_stack.push(ca); + } + } + */ +} diff --git a/mainwindow.h b/mainwindow.h index efbe84c2c..513de35bd 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -197,6 +197,8 @@ private slots: void on_actionEdit_to_Out_Point_triggered(); + void on_actionNest_triggered(); + private: Ui::MainWindow *ui; void setup_layout(); diff --git a/mainwindow.ui b/mainwindow.ui index c52fd9677..1b6a5ec1e 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -99,6 +99,7 @@ + @@ -842,6 +843,11 @@ Ctrl+Alt+W + + + Nest + + diff --git a/ui/timelinewidget.cpp b/ui/timelinewidget.cpp index a7768622a..584a7bc24 100644 --- a/ui/timelinewidget.cpp +++ b/ui/timelinewidget.cpp @@ -92,9 +92,8 @@ void TimelineWidget::show_context_menu(const QPoint& pos) { } } - if (selected_clips.size() == 0) { + if (selected_clips.isEmpty()) { // no clips are selected - panel_timeline->cursor_frame = panel_timeline->getTimelineFrameFromScreenPoint(pos.x()); panel_timeline->cursor_track = getTrackFromScreenPoint(pos.y());