This commit is contained in:
itsmattkc
2019-02-02 23:16:03 +11:00
parent e6db5795a4
commit 3f952b4d6d
22 changed files with 56 additions and 34 deletions
+18 -6
View File
@@ -1428,8 +1428,8 @@ bool Timeline::snap_to_timeline(long* l, bool use_playhead, bool use_markers, bo
return true;
} else {
// try to snap to clip markers
for (int j=0;j<c->markers.size();j++) {
if (snap_to_point(c->markers.at(j).frame + c->timeline_in - c->clip_in, l)) {
for (int j=0;j<c->get_markers().size();j++) {
if (snap_to_point(c->get_markers().at(j).frame + c->timeline_in - c->clip_in, l)) {
return true;
}
}
@@ -1452,14 +1452,26 @@ void Timeline::set_marker() {
for (int i=0;i<sequence->clips.size();i++) {
Clip* c = sequence->clips.at(i);
if (c != nullptr
&& is_clip_selected(c, true)
&& sequence->playhead >= c->timeline_in
&& sequence->playhead <= c->timeline_out) {
clips_selected.append(c);
&& is_clip_selected(c, true)) {
// only add markers if the playhead is inside the clip
if (sequence->playhead >= c->timeline_in
&& sequence->playhead <= c->timeline_out) {
clips_selected.append(c);
}
// we are definitely adding markers to clips though
clip_mode = true;
}
}
// if we've selected clips but none of the clips are within the playhead,
// nothing to do here
if (clip_mode && clips_selected.size() == 0) {
return;
}
QString marker_name;
// if (config.set_name_with_marker) is false (set above), ask for a marker name