-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[ui] Rename node #2953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ui] Rename node #2953
Changes from all commits
1f565dd
5f0c9eb
1fcd889
66771fb
3de772e
9db96f6
1641c73
b879697
96976df
dc515d4
9dde23e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,8 @@ Item { | |
| property bool selected: false | ||
| property bool hovered: false | ||
| property bool dragging: mouseArea.drag.active | ||
| /// Node label | ||
| property string nodeLabel: node ? node.label : "" | ||
| /// Combined x and y | ||
| property point position: Qt.point(x, y) | ||
| /// Styling | ||
|
|
@@ -87,6 +89,12 @@ Item { | |
| root.x = root.node.x | ||
| root.y = root.node.y | ||
| } | ||
| function onNameChanged() { | ||
| // HACK: Make sure when the node name changes the node label is updated | ||
| root.nodeLabel = "" | ||
| // Restore binding to root.node.label | ||
| root.nodeLabel = Qt.binding(function() { return root.node.label; }) | ||
|
Comment on lines
+94
to
+96
|
||
| } | ||
| } | ||
|
|
||
| Timer { | ||
|
|
@@ -399,7 +407,7 @@ Item { | |
| Label { | ||
| id: nodeLabel | ||
| Layout.fillWidth: true | ||
| text: node ? node.label : "" | ||
| text: root.nodeLabel | ||
| padding: 4 | ||
| color: root.mainSelected ? activePalette.highlightedText : activePalette.text | ||
| elide: Text.ElideMiddle | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.