Add saved sources with quick-switch in source picker

Source picker now remembers loaded files and attached processes below a
separator with checkmarks. Clicking a saved source instantly switches
back to it, preserving base addresses per-source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sysadmin
2026-02-06 13:16:26 -07:00
parent 13d403a568
commit 238d895e83
4 changed files with 145 additions and 5 deletions

View File

@@ -9,6 +9,11 @@ class QsciLexerCPP;
namespace rcx {
struct SavedSourceDisplay {
QString text;
bool active = false;
};
class RcxEditor : public QWidget {
Q_OBJECT
public:
@@ -45,6 +50,9 @@ public:
// Custom type names (struct types from the tree) shown in type picker
void setCustomTypeNames(const QStringList& names) { m_customTypeNames = names; }
// Saved sources for quick-switch in source picker
void setSavedSources(const QVector<SavedSourceDisplay>& sources) { m_savedSourceDisplay = sources; }
signals:
void marginClicked(int margin, int line, Qt::KeyboardModifiers mods);
void contextMenuRequested(int line, int nodeIdx, int subLine, QPoint globalPos);
@@ -109,6 +117,9 @@ private:
// ── Custom type names for type picker ──
QStringList m_customTypeNames;
// ── Saved sources for quick-switch ──
QVector<SavedSourceDisplay> m_savedSourceDisplay;
// ── Reentrancy guards ──
bool m_clampingSelection = false;
bool m_updatingComment = false;