paramview: implemented passthrough editing

This commit is contained in:
itsmattkc
2022-04-04 22:13:08 -07:00
parent d7b3c523f4
commit 38c8bd4b0d
10 changed files with 159 additions and 89 deletions
+7 -14
View File
@@ -94,7 +94,8 @@ MainWindow::MainWindow(QWidget *parent) :
// Make node-related connections
connect(node_panel_, &NodePanel::NodesSelected, param_panel_, &ParamPanel::SelectNodes);
connect(node_panel_, &NodePanel::NodesDeselected, param_panel_, &ParamPanel::DeselectNodes);
connect(node_panel_, &NodePanel::NodeGroupOpenRequested, this, &MainWindow::NodeGroupRequested);
connect(node_panel_, &NodePanel::NodeGroupOpened, this, &MainWindow::NodePanelGroupOpenedOrClosed);
connect(node_panel_, &NodePanel::NodeGroupClosed, this, &MainWindow::NodePanelGroupOpenedOrClosed);
connect(param_panel_, &ParamPanel::RequestSelectNode, this, [this](const QVector<Node*>& target){
node_panel_->Select(target, true);
});
@@ -455,15 +456,10 @@ void MainWindow::StatusBarDoubleClicked()
task_man_panel_->raise();
}
void MainWindow::NodeGroupRequested(NodeGroup *group)
void MainWindow::NodePanelGroupOpenedOrClosed()
{
NodePanel *panel = new NodePanel(this);
panel->setFloating(true);
panel->setVisible(true);
panel->SetContexts({group});
panel->SetSignalInsteadOfClose(true);
addDockWidget(Qt::LeftDockWidgetArea, panel);
connect(panel, &NodePanel::CloseRequested, panel, &NodePanel::deleteLater);
NodePanel *p = static_cast<NodePanel*>(sender());
param_panel_->SetContexts(p->GetContexts(), p->IsGroupOverlay());
}
void MainWindow::TimelinePanelSelectionChanged(const QVector<Block *> &blocks)
@@ -732,7 +728,7 @@ void MainWindow::UpdateNodePanelContextFromTimelinePanel(TimelinePanel *panel)
}
node_panel_->SetContexts(context);
param_panel_->SetContexts(context);
param_panel_->SetContexts(context, false);
}
void MainWindow::FocusedPanelChanged(PanelWidget *panel)
@@ -747,10 +743,7 @@ void MainWindow::FocusedPanelChanged(PanelWidget *panel)
const QVector<Node*> &new_ctxs = node_panel->GetContexts();
if (new_ctxs != param_panel_->GetContexts()) {
bool is_default_node_panel = node_panel == node_panel_;
param_panel_->SetIgnoreNodeFlags(!is_default_node_panel);
param_panel_->SetCreateCheckBoxes(is_default_node_panel ? kNoCheckBoxes : kCheckBoxesOnNonConnected);
param_panel_->SetContexts(node_panel->GetContexts());
param_panel_->SetContexts(new_ctxs, node_panel->IsGroupOverlay());
}
} else if (TimelinePanel* timeline = dynamic_cast<TimelinePanel*>(panel)) {
// Signal timeline focus