changed NULLs to nullptr
This commit is contained in:
+85
-85
@@ -112,7 +112,7 @@ void Timeline::previous_cut() {
|
||||
long p_cut = 0;
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
if (c->timeline_out > p_cut && c->timeline_out < sequence->playhead) {
|
||||
p_cut = c->timeline_out;
|
||||
} else if (c->timeline_in > p_cut && c->timeline_in < sequence->playhead) {
|
||||
@@ -129,7 +129,7 @@ void Timeline::next_cut() {
|
||||
long n_cut = LONG_MAX;
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
if (c->timeline_in < n_cut && c->timeline_in > sequence->playhead) {
|
||||
n_cut = c->timeline_in;
|
||||
seek_enabled = true;
|
||||
@@ -164,10 +164,10 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
bool can_import = true;
|
||||
|
||||
Media* medium = media_list.at(i);
|
||||
Footage* m = NULL;
|
||||
Sequence* s = NULL;
|
||||
void* media = NULL;
|
||||
long sequence_length;
|
||||
Footage* m = nullptr;
|
||||
Sequence* s = nullptr;
|
||||
void* media = nullptr;
|
||||
long sequence_length = 0;
|
||||
long default_clip_in = 0;
|
||||
long default_clip_out = 0;
|
||||
|
||||
@@ -186,7 +186,7 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
s = medium->to_sequence();
|
||||
sequence_length = s->getEndFrame();
|
||||
if (seq != NULL) sequence_length = refactor_frame_number(sequence_length, s->frame_rate, seq->frame_rate);
|
||||
if (seq != nullptr) sequence_length = refactor_frame_number(sequence_length, s->frame_rate, seq->frame_rate);
|
||||
media = s;
|
||||
can_import = (s != seq && sequence_length != 0);
|
||||
if (s->using_workarea) {
|
||||
@@ -205,7 +205,7 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
g.old_clip_in = g.clip_in = default_clip_in;
|
||||
g.media = medium;
|
||||
g.in = entry_point;
|
||||
g.transition = NULL;
|
||||
g.transition = nullptr;
|
||||
|
||||
switch (medium->get_type()) {
|
||||
case MEDIA_TYPE_FOOTAGE:
|
||||
@@ -240,7 +240,7 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
g.out = entry_point + sequence_length - default_clip_in;
|
||||
|
||||
if (s->using_workarea && s->enable_workarea) {
|
||||
if (s->using_workarea && s->enable_workarea) {
|
||||
g.out -= (sequence_length - default_clip_out);
|
||||
}
|
||||
|
||||
@@ -354,13 +354,13 @@ void Timeline::add_transition() {
|
||||
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL && is_clip_selected(c, true)) {
|
||||
if (c->get_opening_transition() == NULL) {
|
||||
ca->append(new AddTransitionCommand(c, NULL, NULL, get_internal_meta(TRANSITION_INTERNAL_LINEARFADE, EFFECT_TYPE_TRANSITION), TA_OPENING_TRANSITION, 30));
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
if (c->get_opening_transition() == nullptr) {
|
||||
ca->append(new AddTransitionCommand(c, nullptr, nullptr, get_internal_meta(TRANSITION_INTERNAL_LINEARFADE, EFFECT_TYPE_TRANSITION), TA_OPENING_TRANSITION, 30));
|
||||
adding = true;
|
||||
}
|
||||
if (c->get_closing_transition() == NULL) {
|
||||
ca->append(new AddTransitionCommand(c, NULL, NULL, get_internal_meta(TRANSITION_INTERNAL_LINEARFADE, EFFECT_TYPE_TRANSITION), TA_OPENING_TRANSITION, 30));
|
||||
if (c->get_closing_transition() == nullptr) {
|
||||
ca->append(new AddTransitionCommand(c, nullptr, nullptr, get_internal_meta(TRANSITION_INTERNAL_LINEARFADE, EFFECT_TYPE_TRANSITION), TA_OPENING_TRANSITION, 30));
|
||||
adding = true;
|
||||
}
|
||||
}
|
||||
@@ -388,7 +388,7 @@ int Timeline::calculate_track_height(int track, int value) {
|
||||
}
|
||||
|
||||
void Timeline::update_sequence() {
|
||||
bool null_sequence = (sequence == NULL);
|
||||
bool null_sequence = (sequence == nullptr);
|
||||
|
||||
for (int i=0;i<tool_buttons.count();i++) {
|
||||
tool_buttons[i]->setEnabled(!null_sequence);
|
||||
@@ -413,14 +413,14 @@ int Timeline::get_snap_range() {
|
||||
}
|
||||
|
||||
bool Timeline::focused() {
|
||||
return (sequence != NULL && (headers->hasFocus() || video_area->hasFocus() || audio_area->hasFocus()));
|
||||
return (sequence != nullptr && (headers->hasFocus() || video_area->hasFocus() || audio_area->hasFocus()));
|
||||
}
|
||||
|
||||
void Timeline::repaint_timeline() {
|
||||
if (!block_repaints) {
|
||||
bool draw = true;
|
||||
|
||||
if (sequence != NULL
|
||||
if (sequence != nullptr
|
||||
&& !horizontalScrollBar->isSliderDown()
|
||||
&& !horizontalScrollBar->is_resizing()
|
||||
&& panel_sequence_viewer->playing
|
||||
@@ -446,7 +446,7 @@ void Timeline::repaint_timeline() {
|
||||
video_area->update();
|
||||
audio_area->update();
|
||||
|
||||
if (sequence != NULL) {
|
||||
if (sequence != nullptr) {
|
||||
set_sb_max();
|
||||
|
||||
if (last_frame != sequence->playhead) {
|
||||
@@ -459,11 +459,11 @@ void Timeline::repaint_timeline() {
|
||||
}
|
||||
|
||||
void Timeline::select_all() {
|
||||
if (sequence != NULL) {
|
||||
if (sequence != nullptr) {
|
||||
sequence->selections.clear();
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
Selection s;
|
||||
s.in = c->timeline_in;
|
||||
s.out = c->timeline_out;
|
||||
@@ -476,31 +476,31 @@ void Timeline::select_all() {
|
||||
}
|
||||
|
||||
void Timeline::scroll_to_frame(long frame) {
|
||||
scroll_to_frame_internal(horizontalScrollBar, frame, zoom, timeline_area->width());
|
||||
scroll_to_frame_internal(horizontalScrollBar, frame, zoom, timeline_area->width());
|
||||
}
|
||||
|
||||
void Timeline::select_from_playhead() {
|
||||
sequence->selections.clear();
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL
|
||||
&& c->timeline_in <= sequence->playhead
|
||||
&& c->timeline_out > sequence->playhead) {
|
||||
Selection s;
|
||||
s.in = c->timeline_in;
|
||||
s.out = c->timeline_out;
|
||||
s.track = c->track;
|
||||
sequence->selections.append(s);
|
||||
}
|
||||
}
|
||||
sequence->selections.clear();
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != nullptr
|
||||
&& c->timeline_in <= sequence->playhead
|
||||
&& c->timeline_out > sequence->playhead) {
|
||||
Selection s;
|
||||
s.in = c->timeline_in;
|
||||
s.out = c->timeline_out;
|
||||
s.track = c->track;
|
||||
sequence->selections.append(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Timeline::resizeEvent(QResizeEvent *event) {
|
||||
if (sequence != NULL) set_sb_max();
|
||||
void Timeline::resizeEvent(QResizeEvent *) {
|
||||
if (sequence != nullptr) set_sb_max();
|
||||
}
|
||||
|
||||
void Timeline::delete_in_out(bool ripple) {
|
||||
if (sequence != NULL && sequence->using_workarea) {
|
||||
if (sequence != nullptr && sequence->using_workarea) {
|
||||
QVector<Selection> areas;
|
||||
int video_tracks = 0, audio_tracks = 0;
|
||||
sequence->getTrackLimits(&video_tracks, &audio_tracks);
|
||||
@@ -545,7 +545,7 @@ void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_dele
|
||||
bool can_ripple = true;
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL && c->timeline_in < ripple_point && c->timeline_out > ripple_point) {
|
||||
if (c != nullptr && c->timeline_in < ripple_point && c->timeline_out > ripple_point) {
|
||||
// conflict detected, but this clip may be getting deleted so let's check
|
||||
bool deleted = false;
|
||||
for (int j=0;j<selections.size();j++) {
|
||||
@@ -560,7 +560,7 @@ void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_dele
|
||||
if (!deleted) {
|
||||
for (int j=0;j<sequence->clips.size();j++) {
|
||||
Clip* cc = sequence->clips.at(j);
|
||||
if (cc != NULL
|
||||
if (cc != nullptr
|
||||
&& cc->track == c->track
|
||||
&& cc->timeline_in > c->timeline_out
|
||||
&& cc->timeline_in < c->timeline_out + ripple_length) {
|
||||
@@ -646,7 +646,7 @@ Clip* Timeline::split_clip(ComboAction* ca, int p, long frame) {
|
||||
|
||||
Clip* Timeline::split_clip(ComboAction* ca, int p, long frame, long post_in) {
|
||||
Clip* pre = sequence->clips.at(p);
|
||||
if (pre != NULL && pre->timeline_in < frame && pre->timeline_out > frame) { // guard against attempts to split at in/out points
|
||||
if (pre != nullptr && pre->timeline_in < frame && pre->timeline_out > frame) { // guard against attempts to split at in/out points
|
||||
Clip* post = pre->copy(sequence);
|
||||
|
||||
long new_clip_length = frame - pre->timeline_in;
|
||||
@@ -656,11 +656,11 @@ Clip* Timeline::split_clip(ComboAction* ca, int p, long frame, long post_in) {
|
||||
|
||||
move_clip(ca, pre, pre->timeline_in, frame, pre->clip_in, pre->track);
|
||||
|
||||
if (pre->get_opening_transition() != NULL) {
|
||||
/*if (frame < pre->timeline_in + pre->get_opening_transition()->length && pre->get_opening_transition()->secondary_clip != NULL) {
|
||||
if (pre->get_opening_transition() != nullptr) {
|
||||
/*if (frame < pre->timeline_in + pre->get_opening_transition()->length && pre->get_opening_transition()->secondary_clip != nullptr) {
|
||||
// separate shared transition
|
||||
ca->append(new SetPointer((void**) &pre->get_opening_transition()->secondary_clip, NULL));
|
||||
pre->get_opening_transition()->secondary_clip->closing_transition = pre->get_opening_transition()->copy(pre->get_opening_transition()->secondary_clip, NULL);
|
||||
ca->append(new SetPointer((void**) &pre->get_opening_transition()->secondary_clip, nullptr));
|
||||
pre->get_opening_transition()->secondary_clip->closing_transition = pre->get_opening_transition()->copy(pre->get_opening_transition()->secondary_clip, nullptr);
|
||||
}*/
|
||||
|
||||
if (pre->get_opening_transition()->get_true_length() > new_clip_length) {
|
||||
@@ -669,14 +669,14 @@ Clip* Timeline::split_clip(ComboAction* ca, int p, long frame, long post_in) {
|
||||
|
||||
post->sequence->hard_delete_transition(post, TA_OPENING_TRANSITION);
|
||||
}
|
||||
if (pre->get_closing_transition() != NULL) {
|
||||
if (pre->get_closing_transition() != nullptr) {
|
||||
ca->append(new DeleteTransitionCommand(pre->sequence, pre->closing_transition));
|
||||
if (pre->get_closing_transition()->secondary_clip == NULL) post->get_closing_transition()->set_length(qMin((long) post->get_closing_transition()->get_true_length(), post->getLength()));
|
||||
if (pre->get_closing_transition()->secondary_clip == nullptr) post->get_closing_transition()->set_length(qMin((long) post->get_closing_transition()->get_true_length(), post->getLength()));
|
||||
}
|
||||
|
||||
return post;
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Timeline::has_clip_been_split(int c) {
|
||||
@@ -697,14 +697,14 @@ bool Timeline::split_clip_and_relink(ComboAction *ca, int clip, long frame, bool
|
||||
split_cache.append(clip);
|
||||
|
||||
Clip* c = sequence->clips.at(clip);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
QVector<int> pre_clips;
|
||||
QVector<Clip*> post_clips;
|
||||
|
||||
Clip* post = split_clip(ca, clip, frame);
|
||||
|
||||
// if alt is not down, split clips links too
|
||||
if (post == NULL) {
|
||||
if (post == nullptr) {
|
||||
return false;
|
||||
} else {
|
||||
post_clips.append(post);
|
||||
@@ -721,7 +721,7 @@ bool Timeline::split_clip_and_relink(ComboAction *ca, int clip, long frame, bool
|
||||
if ((original_clip_is_selected && is_clip_selected(link, true)) || !original_clip_is_selected) {
|
||||
split_cache.append(l);
|
||||
Clip* s = split_clip(ca, l, frame);
|
||||
if (s != NULL) {
|
||||
if (s != nullptr) {
|
||||
pre_clips.append(l);
|
||||
post_clips.append(s);
|
||||
}
|
||||
@@ -770,15 +770,15 @@ void Timeline::clean_up_selections(QVector<Selection>& areas) {
|
||||
|
||||
bool selection_contains_transition(const Selection& s, Clip* c, int type) {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
return c->get_opening_transition() != NULL
|
||||
return c->get_opening_transition() != nullptr
|
||||
&& s.out == c->timeline_in + c->get_opening_transition()->get_true_length()
|
||||
&& ((c->get_opening_transition()->secondary_clip == NULL && s.in == c->timeline_in)
|
||||
|| (c->get_opening_transition()->secondary_clip != NULL && s.in == c->timeline_in - c->get_opening_transition()->get_true_length()));
|
||||
&& ((c->get_opening_transition()->secondary_clip == nullptr && s.in == c->timeline_in)
|
||||
|| (c->get_opening_transition()->secondary_clip != nullptr && s.in == c->timeline_in - c->get_opening_transition()->get_true_length()));
|
||||
} else {
|
||||
return c->get_closing_transition() != NULL
|
||||
return c->get_closing_transition() != nullptr
|
||||
&& s.in == c->timeline_out - c->get_closing_transition()->get_true_length()
|
||||
&& ((c->get_closing_transition()->secondary_clip == NULL && s.out == c->timeline_out)
|
||||
|| (c->get_closing_transition()->secondary_clip != NULL && s.out == c->timeline_out + c->get_closing_transition()->get_true_length()));
|
||||
&& ((c->get_closing_transition()->secondary_clip == nullptr && s.out == c->timeline_out)
|
||||
|| (c->get_closing_transition()->secondary_clip != nullptr && s.out == c->timeline_out + c->get_closing_transition()->get_true_length()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,7 +792,7 @@ void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& area
|
||||
const Selection& s = areas.at(i);
|
||||
for (int j=0;j<sequence->clips.size();j++) {
|
||||
Clip* c = sequence->clips.at(j);
|
||||
if (c != NULL && c->track == s.track && !c->undeletable) {
|
||||
if (c != nullptr && c->track == s.track && !c->undeletable) {
|
||||
if (selection_contains_transition(s, c, TA_OPENING_TRANSITION)) {
|
||||
// delete opening transition
|
||||
ca->append(new DeleteTransitionCommand(c->sequence, c->opening_transition));
|
||||
@@ -814,7 +814,7 @@ void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& area
|
||||
// only out point is in deletion area
|
||||
move_clip(ca, c, c->timeline_in, s.in, c->clip_in, c->track);
|
||||
|
||||
if (c->get_closing_transition() != NULL) {
|
||||
if (c->get_closing_transition() != nullptr) {
|
||||
if (s.in < c->timeline_out - c->get_closing_transition()->get_true_length()) {
|
||||
ca->append(new DeleteTransitionCommand(c->sequence, c->closing_transition));
|
||||
} else {
|
||||
@@ -825,7 +825,7 @@ void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& area
|
||||
// only in point is in deletion area
|
||||
move_clip(ca, c, s.out, c->timeline_out, c->clip_in + (s.out - c->timeline_in), c->track);
|
||||
|
||||
if (c->get_opening_transition() != NULL) {
|
||||
if (c->get_opening_transition() != nullptr) {
|
||||
if (s.out > c->timeline_in + c->get_opening_transition()->get_true_length()) {
|
||||
ca->append(new DeleteTransitionCommand(c->sequence, c->opening_transition));
|
||||
} else {
|
||||
@@ -848,7 +848,7 @@ void Timeline::copy(bool del) {
|
||||
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
for (int j=0;j<sequence->selections.size();j++) {
|
||||
const Selection& s = sequence->selections.at(j);
|
||||
if (s.track == c->track && !((c->timeline_in <= s.in && c->timeline_out <= s.in) || (c->timeline_in >= s.out && c->timeline_out >= s.out))) {
|
||||
@@ -858,7 +858,7 @@ void Timeline::copy(bool del) {
|
||||
clipboard_type = CLIPBOARD_TYPE_CLIP;
|
||||
}
|
||||
|
||||
Clip* copied_clip = c->copy(NULL);
|
||||
Clip* copied_clip = c->copy(nullptr);
|
||||
|
||||
// copy linked IDs (we correct these later in paste())
|
||||
copied_clip->linked = c->linked;
|
||||
@@ -993,7 +993,7 @@ void Timeline::paste(bool insert) {
|
||||
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL && is_clip_selected(c, true)) {
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
for (int j=0;j<clipboard.size();j++) {
|
||||
Effect* e = static_cast<Effect*>(clipboard.at(j));
|
||||
if ((c->track < 0) == (e->meta->subtype == EFFECT_TYPE_VIDEO)) {
|
||||
@@ -1039,10 +1039,10 @@ void Timeline::paste(bool insert) {
|
||||
delcom->fx.append(found);
|
||||
ca->append(delcom);
|
||||
|
||||
ca->append(new AddEffectCommand(c, e->copy(c), NULL, found));
|
||||
ca->append(new AddEffectCommand(c, e->copy(c), nullptr, found));
|
||||
push = true;
|
||||
} else {
|
||||
ca->append(new AddEffectCommand(c, e->copy(c), NULL));
|
||||
ca->append(new AddEffectCommand(c, e->copy(c), nullptr));
|
||||
push = true;
|
||||
}
|
||||
}
|
||||
@@ -1061,7 +1061,7 @@ void Timeline::paste(bool insert) {
|
||||
}
|
||||
|
||||
void Timeline::ripple_to_in_point(bool in, bool ripple) {
|
||||
if (sequence != NULL) {
|
||||
if (sequence != nullptr) {
|
||||
if (sequence->clips.size() > 0) {
|
||||
// get track count
|
||||
int track_min = INT_MAX;
|
||||
@@ -1076,7 +1076,7 @@ void Timeline::ripple_to_in_point(bool in, bool ripple) {
|
||||
// find closest in point to playhead
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
track_min = qMin(track_min, c->track);
|
||||
track_max = qMax(track_max, c->track);
|
||||
|
||||
@@ -1180,7 +1180,7 @@ bool Timeline::split_selection(ComboAction* ca) {
|
||||
// find clips within selection and split
|
||||
for (int j=0;j<sequence->clips.size();j++) {
|
||||
Clip* clip = sequence->clips.at(j);
|
||||
if (clip != NULL) {
|
||||
if (clip != nullptr) {
|
||||
for (int i=0;i<sequence->selections.size();i++) {
|
||||
const Selection& s = sequence->selections.at(i);
|
||||
if (s.track == clip->track) {
|
||||
@@ -1197,12 +1197,12 @@ bool Timeline::split_selection(ComboAction* ca) {
|
||||
split_B->timeline_in = s.out;
|
||||
secondary_post_splits.append(split_B);
|
||||
|
||||
if (clip->get_opening_transition() != NULL) {
|
||||
if (clip->get_opening_transition() != nullptr) {
|
||||
split_B->sequence->hard_delete_transition(split_B, TA_OPENING_TRANSITION);
|
||||
split_A->sequence->hard_delete_transition(split_A, TA_OPENING_TRANSITION);
|
||||
}
|
||||
|
||||
if (clip->get_closing_transition() != NULL) {
|
||||
if (clip->get_closing_transition() != nullptr) {
|
||||
ca->append(new DeleteTransitionCommand(clip->sequence, clip->closing_transition));
|
||||
|
||||
split_A->sequence->hard_delete_transition(split_A, TA_CLOSING_TRANSITION);
|
||||
@@ -1213,13 +1213,13 @@ bool Timeline::split_selection(ComboAction* ca) {
|
||||
} else {
|
||||
Clip* post_a = split_clip(ca, j, s.in);
|
||||
Clip* post_b = split_clip(ca, j, s.out);
|
||||
if (post_a != NULL) {
|
||||
if (post_a != nullptr) {
|
||||
pre_splits.append(j);
|
||||
post_splits.append(post_a);
|
||||
split = true;
|
||||
}
|
||||
if (post_b != NULL) {
|
||||
if (post_a != NULL) {
|
||||
if (post_b != nullptr) {
|
||||
if (post_a != nullptr) {
|
||||
pre_splits.append(j);
|
||||
post_splits.append(post_b);
|
||||
} else {
|
||||
@@ -1249,7 +1249,7 @@ bool Timeline::split_all_clips_at_point(ComboAction* ca, long point) {
|
||||
bool split = false;
|
||||
for (int j=0;j<sequence->clips.size();j++) {
|
||||
Clip* c = sequence->clips.at(j);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
// always relinks
|
||||
if (split_clip_and_relink(ca, j, point, true)) {
|
||||
split = true;
|
||||
@@ -1270,9 +1270,9 @@ void Timeline::split_at_playhead() {
|
||||
QVector<Clip*> post_clips;
|
||||
for (int j=0;j<sequence->clips.size();j++) {
|
||||
Clip* clip = sequence->clips.at(j);
|
||||
if (clip != NULL && is_clip_selected(clip, true)) {
|
||||
if (clip != nullptr && is_clip_selected(clip, true)) {
|
||||
Clip* s = split_clip(ca, j, sequence->playhead);
|
||||
if (s != NULL) {
|
||||
if (s != nullptr) {
|
||||
pre_clips.append(j);
|
||||
post_clips.append(s);
|
||||
split_selected = true;
|
||||
@@ -1368,15 +1368,15 @@ bool Timeline::snap_to_timeline(long* l, bool use_playhead, bool use_markers, bo
|
||||
// snap to clip/transition
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
if (snap_to_point(c->timeline_in, l)) {
|
||||
return true;
|
||||
} else if (snap_to_point(c->timeline_out, l)) {
|
||||
return true;
|
||||
} else if (c->get_opening_transition() != NULL
|
||||
} else if (c->get_opening_transition() != nullptr
|
||||
&& snap_to_point(c->timeline_in + c->get_opening_transition()->get_true_length(), l)) {
|
||||
return true;
|
||||
} else if (c->get_closing_transition() != NULL
|
||||
} else if (c->get_closing_transition() != nullptr
|
||||
&& snap_to_point(c->timeline_out - c->get_closing_transition()->get_true_length(), l)) {
|
||||
return true;
|
||||
}
|
||||
@@ -1410,7 +1410,7 @@ void Timeline::toggle_links() {
|
||||
command->s = sequence;
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL && is_clip_selected(c, true)) {
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
if (!command->clips.contains(i)) command->clips.append(i);
|
||||
|
||||
if (c->linked.size() > 0) {
|
||||
@@ -1822,16 +1822,16 @@ void move_clip(ComboAction* ca, Clip *c, long iin, long iout, long iclip_in, int
|
||||
ca->append(new MoveClipAction(c, iin, iout, iclip_in, itrack, relative));
|
||||
|
||||
if (verify_transitions) {
|
||||
if (c->get_opening_transition() != NULL && c->get_opening_transition()->secondary_clip != NULL && c->get_opening_transition()->secondary_clip->timeline_out != iin) {
|
||||
if (c->get_opening_transition() != nullptr && c->get_opening_transition()->secondary_clip != nullptr && c->get_opening_transition()->secondary_clip->timeline_out != iin) {
|
||||
// separate transition
|
||||
ca->append(new SetPointer((void**) &c->get_opening_transition()->secondary_clip, NULL));
|
||||
ca->append(new AddTransitionCommand(c->get_opening_transition()->secondary_clip, NULL, c->get_opening_transition(), NULL, TA_CLOSING_TRANSITION, 0));
|
||||
ca->append(new SetPointer((void**) &c->get_opening_transition()->secondary_clip, nullptr));
|
||||
ca->append(new AddTransitionCommand(c->get_opening_transition()->secondary_clip, nullptr, c->get_opening_transition(), nullptr, TA_CLOSING_TRANSITION, 0));
|
||||
}
|
||||
|
||||
if (c->get_closing_transition() != NULL && c->get_closing_transition()->secondary_clip != NULL && c->get_closing_transition()->parent_clip->timeline_in != iout) {
|
||||
if (c->get_closing_transition() != nullptr && c->get_closing_transition()->secondary_clip != nullptr && c->get_closing_transition()->parent_clip->timeline_in != iout) {
|
||||
// separate transition
|
||||
ca->append(new SetPointer((void**) &c->get_closing_transition()->secondary_clip, NULL));
|
||||
ca->append(new AddTransitionCommand(c, NULL, c->get_closing_transition(), NULL, TA_CLOSING_TRANSITION, 0));
|
||||
ca->append(new SetPointer((void**) &c->get_closing_transition()->secondary_clip, nullptr));
|
||||
ca->append(new AddTransitionCommand(c, nullptr, c->get_closing_transition(), nullptr, TA_CLOSING_TRANSITION, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user