nodeview: made an "infinite scroller"
Set scene rect to huge and hid the scrollbars. The node view should be scrolled with middle click or the hand tool.
This commit is contained in:
@@ -53,7 +53,10 @@ NodeView::NodeView(QWidget *parent) :
|
||||
|
||||
SetFlowDirection(NodeViewCommon::kTopToBottom);
|
||||
|
||||
scene_.setSceneRect(-100, -100, 200, 200);
|
||||
// Set massive scene rect and hide the scrollbars to create an "infinite space" effect
|
||||
scene_.setSceneRect(-1000000, -1000000, 2000000, 2000000);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
}
|
||||
|
||||
NodeView::~NodeView()
|
||||
|
||||
Reference in New Issue
Block a user