feat: fix heatmap false-heat on offset shift, hover flicker, type chooser cleanup

- Clear value history when node offsets change (insert/delete/resize/
  manual offset edit) so stale values from old addresses don't show
  false heat coloring
- Invalidate in-flight async reads (bump refreshGen) when tree layout
  changes, preventing stale snapshot data from re-introducing heat
- Fix command bar hover cursor flicker: remove premature
  applyHoverCursor() from applyDocument() — runs correctly via
  applySelectionOverlays() after text is finalized
- Fix hover indicator survival: reorder refresh() so text-modifying
  passes (updateCommandRow) run before overlay passes
- Guard synthetic Leave events during setText() to preserve hover state
- Remove primitives from type chooser when pointer modifier (* / **)
  is active; remove primitives entirely in Root command bar mode
- Add test_editor and test_controller test coverage for heat clearing,
  hover survival, and mixed hex/non-hex type scenarios
This commit is contained in:
IChooseYou
2026-02-17 11:41:46 -07:00
parent 5ae9ca0979
commit 1c3b4af045
18 changed files with 996 additions and 498 deletions

View File

@@ -8,6 +8,7 @@
#include <QPushButton>
#include <QGroupBox>
#include <QLineEdit>
#include <QSpinBox>
#include <QLabel>
#include "optionsdialog.h"
#include "themes/thememanager.h"
@@ -222,6 +223,45 @@ private slots:
QVERIFY(!aiItem->isHidden());
}
void refreshRateSpinBoxExists() {
OptionsResult defaults;
defaults.refreshMs = 660;
OptionsDialog dlg(defaults);
auto* spin = dlg.findChild<QSpinBox*>("refreshSpin");
QVERIFY(spin);
QCOMPARE(spin->value(), 660);
QCOMPARE(spin->minimum(), 1);
QCOMPARE(spin->maximum(), 60000);
}
void refreshRateResultReflectsInput() {
OptionsResult input;
input.refreshMs = 200;
OptionsDialog dlg(input);
auto r = dlg.result();
QCOMPARE(r.refreshMs, 200);
// Change via spin box
auto* spin = dlg.findChild<QSpinBox*>("refreshSpin");
QVERIFY(spin);
spin->setValue(100);
r = dlg.result();
QCOMPARE(r.refreshMs, 100);
}
void refreshRateClampsMin() {
OptionsResult input;
input.refreshMs = 0; // below minimum
OptionsDialog dlg(input);
auto* spin = dlg.findChild<QSpinBox*>("refreshSpin");
QVERIFY(spin);
// QSpinBox clamps to minimum
QCOMPARE(spin->value(), 1);
}
void dialogInheritsPalette() {
auto& tm = ThemeManager::instance();
const auto& theme = tm.current();