diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-04-15 14:47:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-15 14:47:24 +0200 |
| commit | fc91880faf7968432710e439e77ef067759d16fc (patch) | |
| tree | f941b5ebbc70e8380775098a225001c2379b6e0f /fluid/nodes/Node.cxx | |
| parent | 63db80c07888e5f4dcaff3579a0d174b7df5424d (diff) | |
Reactivating Mergeback functionality. (#1226)
Reactivated code.
Various fixes.
New documentation.
Diffstat (limited to 'fluid/nodes/Node.cxx')
| -rw-r--r-- | fluid/nodes/Node.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fluid/nodes/Node.cxx b/fluid/nodes/Node.cxx index 194484a93..08ec4a05b 100644 --- a/fluid/nodes/Node.cxx +++ b/fluid/nodes/Node.cxx @@ -696,7 +696,6 @@ void Node::add(Node *anchor, Strategy strategy) { Fluid.proj.tree.first = this; } -#if 0 { // make sure that we have no duplicate uid's Node *tp = this; do { @@ -704,7 +703,6 @@ void Node::add(Node *anchor, Strategy strategy) { tp = tp->next; } while (tp!=end && tp!=nullptr); } -#endif // Give the widgets in our tree a chance to update themselves for (Node *t = this; t && t!=end->next; t = t->next) { @@ -1274,11 +1272,14 @@ unsigned short Node::set_uid(unsigned short suggested_uid) { suggested_uid = (unsigned short)rand(); for (;;) { Node *tp = Fluid.proj.tree.first; - for ( ; tp; tp = tp->next) - if (tp!=this && tp->uid_==suggested_uid) + for ( ; tp; tp = tp->next) { + if (tp!=this && tp->uid_==suggested_uid) { break; - if (tp==nullptr) + } + } + if (tp==nullptr) { break; + } suggested_uid = (unsigned short)rand(); } uid_ = suggested_uid; |
