Fix duplicate onBarWidgetRegistryChanged in bar-settings panel

Two handlers were declared for the same property-change signal — QML
refuses to load the file with 'Property value set multiple times', so
summoning omarchy.bar-settings failed silently. Merged the debug log
into the existing catalogRevision++ handler.
This commit is contained in:
Ryan Hughes
2026-05-14 02:21:48 -04:00
parent bcbe12b075
commit 546f4893ff
@@ -287,8 +287,18 @@ Item {
property int catalogRevision: 0
// Bump on every registry assignment (including the initial null → instance
// injection from Loader.onLoaded) so bindings that derive from
// widgetMetadata pick up the new state.
onBarWidgetRegistryChanged: catalogRevision++
// widgetMetadata pick up the new state. The host injects the registry
// asynchronously via the Loader, so we also log once it lands.
onBarWidgetRegistryChanged: {
catalogRevision++
if (!root.barWidgetRegistry) return
console.log("bar-settings open. omarchyPath=" + root.omarchyPath,
"defaultsPath=" + root.defaultsPath,
"userConfigPath=" + root.userConfigPath,
"registry has",
root.barWidgetRegistry.availableIds().length,
"widgets")
}
Connections {
target: root.barWidgetRegistry
function onChanged() {
@@ -421,19 +431,6 @@ Item {
return result
}
// Only log once the registry has actually been injected by the host. The
// raw Component.onCompleted fires before the Loader's onLoaded property
// injection so it would always print `(null)` widgets, which is noise.
onBarWidgetRegistryChanged: {
if (!root.barWidgetRegistry) return
console.log("bar-settings open. omarchyPath=" + root.omarchyPath,
"defaultsPath=" + root.defaultsPath,
"userConfigPath=" + root.userConfigPath,
"registry has",
root.barWidgetRegistry.availableIds().length,
"widgets")
}
FileView {
id: defaultsFile
path: root.defaultsPath