Skip to content

Commit cc4b3ae

Browse files
syrokomskyipaceholder
authored andcommitted
Added the new signal FlowScene::nodePlaced().
1 parent 62ef2e5 commit cc4b3ae

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

include/nodes/internal/FlowScene.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,19 @@ class NODE_EDITOR_PUBLIC FlowScene
9999

100100
Q_SIGNALS:
101101

102+
/**
103+
* @brief Node has been created but not on the scene yet.
104+
* @see nodePlaced()
105+
*/
102106
void nodeCreated(Node &n);
103107

108+
/**
109+
* @brief Node has been added to the scene.
110+
* @details Connect to this signal if need a correct position of node.
111+
* @see nodeCreated()
112+
*/
113+
void nodePlaced(Node &n);
114+
104115
void nodeDeleted(Node &n);
105116

106117
void connectionCreated(Connection &c);

src/FlowView.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ contextMenuEvent(QContextMenuEvent *event)
171171
QPointF posView = this->mapToScene(pos);
172172

173173
node.nodeGraphicsObject().setPos(posView);
174+
175+
_scene->nodePlaced(node);
174176
}
175177
else
176178
{

0 commit comments

Comments
 (0)