ensure dependency position is set when using add tool

This commit is contained in:
itsmattkc
2021-03-22 12:08:43 +11:00
parent 78e0777c27
commit 4cb14ae1e0
+4
View File
@@ -107,6 +107,8 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
clip,
ghost_->GetAdjustedIn()));
QPointF extra_node_offset(-1, 0);
switch (Core::instance()->GetSelectedAddableObject()) {
case olive::Tool::kAddableEmpty:
// Empty, nothing to be done
@@ -119,6 +121,7 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
solid));
command->add_child(new NodeEdgeAddCommand(solid, NodeInput(clip, ClipBlock::kBufferIn)));
command->add_child(new NodeSetPositionToOffsetOfAnotherNodeCommand(solid, clip, extra_node_offset));
break;
}
case olive::Tool::kAddableTitle:
@@ -129,6 +132,7 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
text));
command->add_child(new NodeEdgeAddCommand(text, NodeInput(clip, ClipBlock::kBufferIn)));
command->add_child(new NodeSetPositionToOffsetOfAnotherNodeCommand(text, clip, extra_node_offset));
break;
}
case olive::Tool::kAddableBars: