nodeview: stripped out auto-position function

Hopefully this shouldn't be necessary anymore
This commit is contained in:
itsmattkc
2021-07-19 18:40:22 -07:00
parent 9c63393f50
commit 8d72685eaa
4 changed files with 0 additions and 59 deletions
-17
View File
@@ -108,7 +108,6 @@ void NodeView::SetGraph(NodeGraph *graph, const QVector<Node*> &nodes)
if (graph_changed) {
if (graph_) {
// Disconnect from current graph
//disconnect(graph_, &NodeGraph::NodeAdded, this, &NodeView::AddNode);
disconnect(graph_, &NodeGraph::NodeRemoved, this, &NodeView::RemoveNode);
disconnect(graph_, &NodeGraph::InputConnected, this, &NodeView::AddEdge);
disconnect(graph_, &NodeGraph::InputDisconnected, this, &NodeView::RemoveEdge);
@@ -120,7 +119,6 @@ void NodeView::SetGraph(NodeGraph *graph, const QVector<Node*> &nodes)
if (graph_) {
// Connect to new graph
//connect(graph_, &NodeGraph::NodeAdded, this, &NodeView::AddNode);
connect(graph_, &NodeGraph::NodeRemoved, this, &NodeView::RemoveNode);
connect(graph_, &NodeGraph::InputConnected, this, &NodeView::AddEdge);
connect(graph_, &NodeGraph::InputDisconnected, this, &NodeView::RemoveEdge);
@@ -940,12 +938,6 @@ void NodeView::ShowContextMenu(const QPoint &pos)
// Color menu
MenuShared::instance()->AddColorCodingMenu(&m);
m.addSeparator();
// Auto-position action
QAction* autopos = m.addAction(tr("Auto-Position"));
connect(autopos, &QAction::triggered, this, &NodeView::AutoPositionDescendents);
ViewerOutput* viewer = dynamic_cast<ViewerOutput*>(selected.first()->GetNode());
if (viewer) {
m.addSeparator();
@@ -1030,15 +1022,6 @@ void NodeView::ContextMenuSetDirection(QAction *action)
SetFlowDirection(static_cast<NodeViewCommon::FlowDirection>(action->data().toInt()));
}
void NodeView::AutoPositionDescendents()
{
QVector<Node*> selected = scene_.GetSelectedNodes();
for (Node* n : selected) {
scene_.ReorganizeFrom(n);
}
}
void NodeView::ContextMenuFilterChanged(QAction *action)
{
FilterMode mode = static_cast<FilterMode>(action->data().toInt());