nodeview: make auto-position a manual and specific function, allow different flow directions
The first in many NodeView improvements. Up until now, nodes have been forcibly auto-arranged, which has worked as a reasonable stop-gap just so that all the nodes are visible during testing/development. However this does not make a good user experience. We move the auto-arrange code to a manual function that can be used when the user or program deems it necessary, and also abstract the node positions so that the view can ultimately determine the exact amount of spacing (useful for changing DPIs) or orientation, so users can direct the flow whichever way they want.
This commit is contained in:
@@ -45,7 +45,7 @@ NodeView::NodeView(QWidget *parent) :
|
||||
connect(&scene_, &QGraphicsScene::selectionChanged, this, &NodeView::SceneSelectionChangedSlot);
|
||||
connect(this, &NodeView::customContextMenuRequested, this, &NodeView::ShowContextMenu);
|
||||
|
||||
SetFlowDirection(NodeViewCommon::kTopToBottom);
|
||||
SetFlowDirection(NodeViewCommon::kLeftToRight);
|
||||
}
|
||||
|
||||
NodeView::~NodeView()
|
||||
|
||||
Reference in New Issue
Block a user