Merge pull request #220 from olive-editor/timelinebehaviorfixes

fixed crash when copying an effect after copying a clip
This commit is contained in:
itsmattkc
2018-12-30 08:39:58 +11:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -111,9 +111,9 @@ void EffectControls::copy(bool del) {
Effect* effect = c->effects.at(j);
if (effect->container->selected) {
if (!cleared) {
clipboard_type = CLIPBOARD_TYPE_EFFECT;
clear_clipboard();
cleared = true;
clipboard_type = CLIPBOARD_TYPE_EFFECT;
}
clipboard.append(effect->copy(NULL));
+4 -2
View File
@@ -1283,8 +1283,10 @@ void TimelineWidget::update_ghosts(const QPoint& mouse_pos, bool lock_frame) {
if (validator < 1) frame_diff -= (1 - validator);
// prevent timeline in from going below 0
validator = g.old_in + frame_diff;
if (validator < 0) frame_diff -= validator;
if (panel_timeline->tool != TIMELINE_TOOL_RIPPLE) {
validator = g.old_in + frame_diff;
if (validator < 0) frame_diff -= validator;
}
// prevent clip_in from going below 0
if (c->media->get_type() == MEDIA_TYPE_SEQUENCE