Merge branch 'master' into nodeview-redux

This commit is contained in:
itsmattkc
2021-06-16 17:20:05 -07:00
23 changed files with 8608 additions and 5122 deletions
+16
View File
@@ -1370,6 +1370,8 @@ public:
Track* track = timeline_->GetTrackAt(track_index_);
track->BeginOperation();
bool append = (in_ >= track->track_length());
// Check if the placement location is past the end of the timeline
@@ -1409,6 +1411,12 @@ public:
}
}
track->EndOperation();
if (ripple_remove_command_) {
track->Node::InvalidateCache(TimeRange(insert_->in(), insert_->out()), Track::kBlockInput);
}
for (int i=0; i<position_commands_.size(); i++) {
position_commands_.at(i)->redo();
}
@@ -1422,7 +1430,10 @@ public:
Track* t = timeline_->GetTrackAt(track_index_);
TimeRange insert_range(insert_->in(), insert_->out());
// Firstly, remove our insert
t->BeginOperation();
t->RippleRemoveBlock(insert_);
if (ripple_remove_command_) {
@@ -1432,6 +1443,11 @@ public:
t->RippleRemoveBlock(gap_);
gap_->setParent(&memory_manager_);
}
t->EndOperation();
if (ripple_remove_command_) {
t->Node::InvalidateCache(insert_range, Track::kBlockInput);
}
// Remove tracks if we added them
for (int i=add_track_commands_.size()-1; i>=0; i--) {
+5 -1
View File
@@ -87,7 +87,11 @@ void ImportTool::DragEnter(TimelineViewMouseEvent *event)
PrepGhosts(drag_start_.GetFrame() - parent()->SceneToTime(import_pre_buffer_),
drag_start_.GetTrack().index());
event->accept();
if (parent()->HasGhosts() || !parent()->GetConnectedNode()) {
event->accept();
} else {
event->ignore();
}
} else {
// FIXME: Implement dropping from file
event->ignore();