From 3f4a1a4f82ff828f8312a104dfb1728a91a87ea9 Mon Sep 17 00:00:00 2001 From: Didrik Galteland Date: Sat, 10 Oct 2026 12:04:15 +0200 Subject: [PATCH] Apply the checked preset again on click and hotkey A click or hotkey on the checked preset did nothing. The checkmark only goes off when Crisp itself changes a display, so after a change made elsewhere (System Settings, macOS putting back a stored arrangement) the preset could not be applied again until something else in Crisp was touched (#212). Applying a preset that already matches changes nothing: resolution and HDR are skipped when they match, the arrangement write leaves the displays where they are, and brightness and Image Adjustment fade to the value they already have. --- Crisp/Services/HotkeyService.swift | 7 ++----- Crisp/Views/PresetListView.swift | 5 +++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Crisp/Services/HotkeyService.swift b/Crisp/Services/HotkeyService.swift index caf38b9..7d65fc6 100644 --- a/Crisp/Services/HotkeyService.swift +++ b/Crisp/Services/HotkeyService.swift @@ -126,12 +126,9 @@ final class HotkeyService { Self.log.info("hotkey press: id \(id), known=\(self.registrations[id] != nil)") switch registrations[id]?.target { case .preset(let presetID): - // Same guards as tapping the preset row: no-op while one applies or - // when this preset is already the active (checkmarked) one, so a - // repeat press doesn't re-apply and jiggle the row. + // Same guards as tapping the preset row: no-op while one applies. guard let preset = PresetService.shared.presets.first(where: { $0.id == presetID }), - !PresetService.shared.isApplying, - PresetService.shared.activePresetID != presetID + !PresetService.shared.isApplying else { return } Task { await PresetService.shared.applyPreset(preset) } case .hidpiToggle: diff --git a/Crisp/Views/PresetListView.swift b/Crisp/Views/PresetListView.swift index fb1c56a..590c254 100644 --- a/Crisp/Views/PresetListView.swift +++ b/Crisp/Views/PresetListView.swift @@ -181,8 +181,9 @@ struct PresetRow: View { .menuRowHover(isHovered) .contentShape(Rectangle()) .onTapGesture { - // Already the active preset (the checkmarked row): tapping it is a no-op. - guard PanelOpenGuard.allowsActivation, !PresetService.shared.isApplying, !isCurrentMatch else { return } + // The checkmarked row applies again too: a change made outside Crisp + // leaves the checkmark on (#212). + guard PanelOpenGuard.allowsActivation, !PresetService.shared.isApplying else { return } Task { await PresetService.shared.applyPreset(preset) } } .onHover { isHovered = $0 }