Viewer importer: key binding import wipes keybinds (WASD etc.) -- overwrite + resetBindings, no merge/validation #232
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#232
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Report
Importing settings from another viewer (Firestorm) wiped the keybinds: WASD movement and similar no longer work.
Likely cause (from code reading; not yet reproduced)
SLFloaterViewerImport::onImport()(key bindings checkbox):key_bindings.xmlover ours (fs::copy_file(..., overwrite_existing)).gViewerInput.loadBindingsXML(dst).LLViewerInput::loadBindingsXML()starts withresetBindings()(clears every binding). It then loads only what parses and validates from the file. So:keys.validateBlock()(FS-specific attributes / commands / modes), nothing loads and every mode is left empty..pre-importbackup exists but nothing restores it.Fix
(mode, key, mask, mouse) -> commandentries whose command exists in our command set;.pre-importbackup, or our defaults) in the importer and in Preferences > Controls;Repro to confirm
key_bindings.xml.Fixed on branch
vimport(commitsdfc44c53caandbafa583924). Not built yet; syntax-checked only.Import no longer overwrites; it merges
key_bindings.xmlwithLLXMLNode(attributes only, noLLInitParamvalidation), and Black Dragon'scontrols.xml. For BD, mode 2 (its build mode) is dropped andtoggle_crouchbecomestoggle_down. If their file can't be read, ours is not touched.(mode, key / mouse, mask) -> commandis compared with ours:LLViewerInput::isKnownCommand) is skipped;LLViewerInput::hasBinding. If any core command that had a binding before lost it, the previous file is restored (or removed, if there was none) and reloaded, and the report says "import reverted".user_settings/import_backups/<date_time>/, and Undo last import restores it.Recovery for users already affected
LLAppViewer::loadKeyBindingschecks the userkey_bindings.xml. If it leavespush_forwardandpush_backwardunbound in third person, the file is moved tokey_bindings.xml.unusable, the defaults are loaded, and a notice (KeyBindingsRestoredAtStartup) says so.Acceptance test (the repro from this ticket)
key_bindings.xml.third_personinkey_bindings.xml. The next launch should show the notice and leavekey_bindings.xml.unusablebehind.Verified done: key-binding import no longer overwrites and resets; it merges in memory (unknown commands skipped, conflicts listed unticked, core commands never left unbound) and recovers from an unusable key_bindings.xml at startup. Commits:
dfc44c53ca,bafa583924. Shipped in v1.0.0-beta.1.