started work on nesting function
This commit is contained in:
@@ -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<Clip*> selected_clips;
|
||||
long earliest_point = LONG_MAX;
|
||||
for (int i=0;i<sequence->clips.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;i<selected_clips.size();i++) {
|
||||
Clip* c = selected_clips.at(i);
|
||||
s->clips.append(c);
|
||||
}
|
||||
|
||||
ComboAction* ca = new ComboAction();
|
||||
panel_project->new_sequence(ca, s, true, NULL);
|
||||
undo_stack.push(ca);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -197,6 +197,8 @@ private slots:
|
||||
|
||||
void on_actionEdit_to_Out_Point_triggered();
|
||||
|
||||
void on_actionNest_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
void setup_layout();
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionSet_Edit_Marker"/>
|
||||
<addaction name="actionEnable_Disable_Clip"/>
|
||||
<addaction name="actionNest"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuWindow">
|
||||
<property name="title">
|
||||
@@ -842,6 +843,11 @@
|
||||
<string>Ctrl+Alt+W</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNest">
|
||||
<property name="text">
|
||||
<string>Nest</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user