mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
Struct headers: type+name format, auto-collapse, no footer when collapsed
- Add structTypeName field to Node for struct type names
- Struct headers now show: struct TYPENAME name {
- Auto-collapse structs/arrays by default
- Skip footer rendering when collapsed (cleaner view)
- Fix header span calculations for new format
- Disable brace matching (not needed for structured viewer)
- Change hover color to muted teal (distinct from keywords)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "controller.h"
|
||||
#include <Qsci/qsciscintilla.h>
|
||||
#include <QSplitter>
|
||||
#include <QFile>
|
||||
#include <QJsonDocument>
|
||||
@@ -338,8 +339,8 @@ void RcxController::insertNode(uint64_t parentId, int offset, NodeKind kind, con
|
||||
n.offset = offset;
|
||||
}
|
||||
|
||||
// Assign ID before storing
|
||||
n.id = m_doc->tree.m_nextId;
|
||||
// Reserve unique ID atomically before pushing command
|
||||
n.id = m_doc->tree.reserveId();
|
||||
|
||||
m_doc->undoStack.push(new RcxCommand(this, cmd::Insert{n}));
|
||||
}
|
||||
@@ -627,6 +628,10 @@ void RcxController::showContextMenu(RcxEditor* editor, int line, int nodeIdx,
|
||||
QStringLiteral("+0x") + QString::number(off, 16).toUpper().rightJustified(4, '0'));
|
||||
});
|
||||
|
||||
menu.addAction("Copy All as &Text", [editor]() {
|
||||
QApplication::clipboard()->setText(editor->scintilla()->text());
|
||||
});
|
||||
|
||||
menu.exec(globalPos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user