Compare commits
1 Commits
feat/async
...
feat/hiera
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6fa2f0d2c |
@@ -660,7 +660,13 @@ QString EditingContextResolver::expandLabel(const ContextDefinition& def) const
|
|||||||
void EditingContextResolver::buildStack(EditingContext& ctx,
|
void EditingContextResolver::buildStack(EditingContext& ctx,
|
||||||
const ContextDefinition& leaf) const
|
const ContextDefinition& leaf) const
|
||||||
{
|
{
|
||||||
// Walk from leaf up through parentId chain, verifying each ancestor matches
|
// Walk from leaf up through parentId chain.
|
||||||
|
// We trust the parentId declarations — the leaf already matched, and the
|
||||||
|
// hierarchy is the addon author's assertion of structural containment.
|
||||||
|
// Parent match() functions are designed for flat priority resolution and
|
||||||
|
// may not return true when a more specific child is active (e.g.
|
||||||
|
// assembly.idle won't match during assembly.edit because the "part"
|
||||||
|
// active object changes during edit mode).
|
||||||
QStringList reverseStack;
|
QStringList reverseStack;
|
||||||
reverseStack.append(leaf.id);
|
reverseStack.append(leaf.id);
|
||||||
|
|
||||||
@@ -675,15 +681,8 @@ void EditingContextResolver::buildStack(EditingContext& ctx,
|
|||||||
reverseStack.last().toUtf8().constData());
|
reverseStack.last().toUtf8().constData());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Only include parent if it matches current state
|
reverseStack.append(parentDef->id);
|
||||||
if (parentDef->match && parentDef->match()) {
|
currentParent = parentDef->parentId;
|
||||||
reverseStack.append(parentDef->id);
|
|
||||||
currentParent = parentDef->parentId;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Parent doesn't match — stop climbing (partial stack)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverse to get root-to-leaf order
|
// Reverse to get root-to-leaf order
|
||||||
|
|||||||
Reference in New Issue
Block a user