fix: type chooser always shows modifiers, tabs show class name, dock buttons restored on re-dock

This commit is contained in:
IChooseYou
2026-03-06 09:23:36 -07:00
committed by IChooseYou
parent b7eebedf50
commit 03c49d19dd
3 changed files with 15 additions and 30 deletions

View File

@@ -231,17 +231,7 @@ void RcxController::connectEditor(RcxEditor* editor) {
TypePopupMode mode = TypePopupMode::FieldType;
if (target == EditTarget::ArrayElementType)
mode = TypePopupMode::ArrayElement;
else if (target == EditTarget::PointerTarget) {
// Primitive pointers (ptrDepth>0) should open FieldType with
// the base type selected and *//** preselected — not PointerTarget.
bool isPrimPtr = false;
if (nodeIdx >= 0 && nodeIdx < m_doc->tree.nodes.size()) {
const auto& n = m_doc->tree.nodes[nodeIdx];
isPrimPtr = n.ptrDepth > 0 && n.refId == 0;
}
mode = isPrimPtr ? TypePopupMode::FieldType
: TypePopupMode::PointerTarget;
}
// PointerTarget is handled as FieldType — modifiers * / ** will be pre-selected
showTypePopup(editor, mode, nodeIdx, globalPos);
});