only allow splitting clips
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ endif()
|
|||||||
target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS})
|
target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS})
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(${OLIVE_TARGET} PRIVATE /WX /O2 /experimental:external /external:anglebrackets /external:W0)
|
target_compile_options(${OLIVE_TARGET} PRIVATE /WX /experimental:external /external:anglebrackets /external:W0 "$<$<CONFIG:RELEASE>:/O2>")
|
||||||
else()
|
else()
|
||||||
target_compile_options(${OLIVE_TARGET} PRIVATE -O2 -Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion)
|
target_compile_options(${OLIVE_TARGET} PRIVATE -O2 -Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
+1
-7
@@ -172,9 +172,6 @@ void Node::CopyInputs(Node *source, Node *destination, bool include_connections)
|
|||||||
{
|
{
|
||||||
Q_ASSERT(source->id() == destination->id());
|
Q_ASSERT(source->id() == destination->id());
|
||||||
|
|
||||||
source->LockUserInput();
|
|
||||||
destination->LockUserInput();
|
|
||||||
|
|
||||||
const QList<NodeParam*>& src_param = source->params_;
|
const QList<NodeParam*>& src_param = source->params_;
|
||||||
const QList<NodeParam*>& dst_param = destination->params_;
|
const QList<NodeParam*>& dst_param = destination->params_;
|
||||||
|
|
||||||
@@ -186,12 +183,9 @@ void Node::CopyInputs(Node *source, Node *destination, bool include_connections)
|
|||||||
|
|
||||||
NodeInput* dst = static_cast<NodeInput*>(dst_param.at(i));
|
NodeInput* dst = static_cast<NodeInput*>(dst_param.at(i));
|
||||||
|
|
||||||
NodeInput::CopyValues(src, dst, include_connections, false);
|
NodeInput::CopyValues(src, dst, include_connections, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
source->UnlockUserInput();
|
|
||||||
destination->UnlockUserInput();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DuplicateConnectionsBetweenListsInternal(const QList<Node *> &source, const QList<Node *> &destination, NodeInput* source_input, NodeInput* dest_input)
|
void DuplicateConnectionsBetweenListsInternal(const QList<Node *> &source, const QList<Node *> &destination, NodeInput* source_input, NodeInput* dest_input)
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ void TimelineWidget::SplitAtPlayhead()
|
|||||||
foreach (TrackOutput* track, timeline_node_->Tracks()) {
|
foreach (TrackOutput* track, timeline_node_->Tracks()) {
|
||||||
Block* b = track->BlockContainingTime(playhead_time);
|
Block* b = track->BlockContainingTime(playhead_time);
|
||||||
|
|
||||||
if (b) {
|
if (b && b->type() == Block::kClip) {
|
||||||
bool selected = false;
|
bool selected = false;
|
||||||
|
|
||||||
// See if this block is selected
|
// See if this block is selected
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ void TimelineWidget::RazorTool::MouseRelease(TimelineViewMouseEvent *event)
|
|||||||
|
|
||||||
// Ensure there's a valid block here
|
// Ensure there's a valid block here
|
||||||
if (block_at_time
|
if (block_at_time
|
||||||
|
&& block_at_time->type() == Block::kClip
|
||||||
&& !blocks_to_split.contains(block_at_time)) {
|
&& !blocks_to_split.contains(block_at_time)) {
|
||||||
blocks_to_split.append(block_at_time);
|
blocks_to_split.append(block_at_time);
|
||||||
|
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ BlockSplitCommand::BlockSplitCommand(TrackOutput* track, Block *block, rational
|
|||||||
old_length_(block->length()),
|
old_length_(block->length()),
|
||||||
point_(point)
|
point_(point)
|
||||||
{
|
{
|
||||||
Q_ASSERT(point > block_->in() && point < block_->out());
|
Q_ASSERT(point > block_->in() && point < block_->out() && block_->type() == Block::kClip);
|
||||||
|
|
||||||
// Ensures that this block is deleted if this action is undone
|
// Ensures that this block is deleted if this action is undone
|
||||||
new_block_ = static_cast<Block*>(block_->copy());
|
new_block_ = static_cast<Block*>(block_->copy());
|
||||||
|
|||||||
Reference in New Issue
Block a user