Skip to content

Commit 1a4e908

Browse files
andyclaude
andcommitted
Machine Registration: typing a machine no longer overwrites a Name you typed
The Name field followed every keystroke in Machine. It now follows only while Name is empty or still the value it filled in itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0167GfjZWhsGJh9at1F9sc9y
1 parent 108bce3 commit 1a4e908

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/apps/machregister/WxMachineRegister.C‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,14 @@ void WxMachineRegister::machineFullNameUpdatedCB(wxCommandEvent& event)
387387

388388
// Only when the user types a machine: loading a saved entry must keep
389389
// its own name, or Delete looks for a name that was never saved.
390+
// Follow the machine only while Name is empty or still the value
391+
// filled in here, so a name the user typed is never overwritten.
390392
if (!p_inCtrlUpdate) {
391-
p_machineRefNameText->SetValue(refName);
393+
string current = (string)(p_machineRefNameText->GetValue());
394+
if (current.empty() || current == p_autoRefName) {
395+
p_autoRefName = refName;
396+
p_machineRefNameText->SetValue(refName);
397+
}
392398
p_machineChangeButton->Enable(true);
393399
}
394400

‎src/apps/machregister/WxMachineRegister.H‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ class WxMachineRegister: public WxMachineRegisterGUI
183183

184184
RefMachine *p_slctRgstn;
185185
bool p_inCtrlUpdate;
186+
string p_autoRefName;
186187

187188
string p_slctQueue;
188189

0 commit comments

Comments
 (0)