mirror of
https://github.com/deunix-educ/sourizz.git
synced 2026-11-25 04:39:43 +01:00
Make the annotation and click-preview hotkeys switch on what they need
Ctrl+Alt+Shift+A did nothing while the master switch was off, and Ctrl+Alt+Shift+Y did nothing unless the master switch and the click effects were both on, with no feedback. They now enable what is missing (and persist it, like the other toggles) before acting. Document the Y hotkey in both READMEs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+17
-2
@@ -151,8 +151,23 @@ impl Core {
|
||||
}
|
||||
Err(e) => log::warn!("set {k}: {e}"),
|
||||
},
|
||||
Command::ShowClick => self.engine.show_click(now),
|
||||
Command::AnnotateToggle => self.engine.toggle_annotation_mode(),
|
||||
Command::ShowClick => {
|
||||
// Asking for a preview of the click effect must not silently do nothing: switch on what it needs.
|
||||
if !self.cfg.general.enabled || !self.cfg.clicks.enabled {
|
||||
self.cfg.general.enabled = true;
|
||||
self.cfg.clicks.enabled = true;
|
||||
self.commit();
|
||||
}
|
||||
self.engine.show_click(now);
|
||||
}
|
||||
Command::AnnotateToggle => {
|
||||
// Annotation mode only starts while the master switch is on; leaving it needs nothing.
|
||||
if !self.cfg.general.enabled {
|
||||
self.cfg.general.enabled = true;
|
||||
self.commit();
|
||||
}
|
||||
self.engine.toggle_annotation_mode();
|
||||
}
|
||||
Command::AnnotateClear => self.engine.clear_annotations(),
|
||||
Command::Reload => self.reload(),
|
||||
Command::Status(tx) => {
|
||||
|
||||
Reference in New Issue
Block a user