diff --git a/app/widget/nodeparamview/nodeparamview.cpp b/app/widget/nodeparamview/nodeparamview.cpp index 590758aeb..c734af945 100644 --- a/app/widget/nodeparamview/nodeparamview.cpp +++ b/app/widget/nodeparamview/nodeparamview.cpp @@ -40,7 +40,6 @@ NodeParamView::NodeParamView(bool create_keyframe_view, QWidget *parent) : super(true, false, parent), last_scroll_val_(0), focused_node_(nullptr), - time_target_(nullptr), show_all_nodes_(false) { // Create horizontal layout to place scroll area in (and keyframe editing eventually) @@ -365,13 +364,6 @@ void NodeParamView::ConnectedNodeChangeEvent(ViewerOutput *n) foreach (NodeParamViewContext* item, context_items_) { item->SetTimeTarget(n); } - - time_target_ = n; -} - -ViewerOutput *NodeParamView::GetTimeTarget() const -{ - return time_target_; } void ReconnectOutputsIfNotDeletingNode(MultiUndoCommand *c, NodeViewDeleteCommand *dc, Node *output, Node *deleting, Node *context) @@ -721,7 +713,7 @@ void NodeParamView::AddNode(Node *n, Node *ctx, NodeParamViewContext *context) connect(item, &NodeParamViewItem::RequestEditTextInViewer, this, &NodeParamView::RequestEditTextInViewer); item->SetContext(ctx); - item->SetTimeTarget(GetTimeTarget()); + item->SetTimeTarget(GetConnectedNode()); item->SetTimebase(timebase()); context->AddNode(item); diff --git a/app/widget/nodeparamview/nodeparamview.h b/app/widget/nodeparamview/nodeparamview.h index f9ecc5fb5..a542fcc56 100644 --- a/app/widget/nodeparamview/nodeparamview.h +++ b/app/widget/nodeparamview/nodeparamview.h @@ -48,8 +48,6 @@ public: void CloseContextsBelongingToProject(Project *p); - ViewerOutput *GetTimeTarget() const; - void DeleteSelected(); void SelectAll() @@ -156,8 +154,6 @@ private: NodeParamViewItem* focused_node_; QVector selected_nodes_; - ViewerOutput *time_target_; - QVector contexts_; QVector current_contexts_; diff --git a/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp b/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp index cdc80f417..693e66bd4 100644 --- a/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp +++ b/app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp @@ -547,7 +547,8 @@ void NodeParamViewWidgetBridge::TimeTargetConnectEvent(ViewerOutput *v) void NodeParamViewWidgetBridge::InputValueChanged(const NodeInput &input, const TimeRange &range) { - if (GetInnerInput() == input + if (GetTimeTarget() + && GetInnerInput() == input && !dragger_.IsStarted() && range.in() <= GetTimeTarget()->GetPlayhead() && range.out() >= GetTimeTarget()->GetPlayhead()) { // We'll need to update the widgets because the values have changed on our current time