Simplify shared input settings to direct sending
This commit is contained in:
parent
f66105cb81
commit
dc4ba98e88
|
|
@ -602,7 +602,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "canvas-pilot"
|
||||
version = "0.9.60"
|
||||
version = "0.9.61"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"craft-dwg",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.9.60"
|
||||
version = "0.9.61"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot"
|
||||
|
|
|
|||
|
|
@ -174,12 +174,6 @@ impl InputDraft {
|
|||
),
|
||||
);
|
||||
}
|
||||
add(
|
||||
"control/pp/enableCropFinder",
|
||||
"Finder (visible on device outputs)",
|
||||
"Crop",
|
||||
Kind::Toggle,
|
||||
);
|
||||
for (key, label) in [
|
||||
("brightness", "Brightness"),
|
||||
("contrast", "Contrast"),
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ pub(super) struct InputsWindow {
|
|||
sending_input: u32,
|
||||
reading: bool,
|
||||
sending_host: String,
|
||||
review: bool,
|
||||
pub message: String,
|
||||
}
|
||||
impl Editor {
|
||||
|
|
@ -69,7 +68,6 @@ impl Editor {
|
|||
self.inputs.capture = None;
|
||||
self.inputs.capture_key = None;
|
||||
self.inputs.host = self.device.host.clone();
|
||||
self.inputs.review = false;
|
||||
}
|
||||
if let Some(rx) = &self.inputs.pending {
|
||||
match rx.try_recv() {
|
||||
|
|
@ -115,7 +113,7 @@ impl Editor {
|
|||
egui::Window::new("Input settings").id(egui::Id::new("device-input-settings"))
|
||||
.open(&mut open).default_size([1040.0,700.0]).vscroll(true).show(ctx,|ui|{
|
||||
ui.label("Shared preprocessing · affects every layer using this device input, including Program.");
|
||||
ui.small("Drafts stay in this session. Nothing is sent until Review and Send input settings.");
|
||||
ui.small("Drafts stay in this session. Nothing is sent until you click Send changes.");
|
||||
let Some(snapshot)=&self.device.snapshot else {
|
||||
ui.label("Connect to a supported device to inspect its inputs.");
|
||||
if ui.button("Device connection…").clicked(){self.device.connection_open=true;}
|
||||
|
|
@ -131,7 +129,7 @@ impl Editor {
|
|||
egui::ComboBox::from_id_salt("device-input-picker").selected_text(format!("Input {}",self.inputs.selected)).show_ui(ui,|ui|{
|
||||
for input in &inputs {
|
||||
if ui.selectable_value(&mut self.inputs.selected,input.id,format!("Input {}{}{}",input.id,if input.signal{""}else{" · no signal"},if self.inputs.drafts.get(&input.id).is_some_and(InputDraft::dirty){" · edited"}else{""})).changed(){
|
||||
self.inputs.capture=None;self.inputs.capture_key=None;self.inputs.review=false;self.inputs.drag=None;self.inputs.edit_start=None;
|
||||
self.inputs.capture=None;self.inputs.capture_key=None;self.inputs.drag=None;self.inputs.edit_start=None;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -183,7 +181,7 @@ impl Editor {
|
|||
let mut keep = draft.keeps_group(group);
|
||||
if ui.checkbox(&mut keep,"Keep device values").on_hover_text("Leave this category untouched when sending. Checking discards its draft edits.").changed() {
|
||||
draft.keep_group(group,keep);
|
||||
state.review=false;
|
||||
|
||||
if group=="Crop" {state.drag=None;}
|
||||
}
|
||||
ui.add_enabled_ui(!keep, |ui| {
|
||||
|
|
@ -212,17 +210,12 @@ impl Editor {
|
|||
ui.small("LUT controls require an allocated resource. Signal/HDCP and resource allocation remain in WebRCS.");
|
||||
});
|
||||
});
|
||||
if before!=draft.values {state.review=false;if !undoing && state.edit_start.is_none(){state.edit_start=Some(before);}}
|
||||
if before!=draft.values && !undoing && state.edit_start.is_none(){state.edit_start=Some(before);}
|
||||
if !ui.input(|i|i.pointer.any_down()) && let Some(before)=state.edit_start.take(){let history=state.undo.entry(id).or_default();history.push(before);if history.len()>100{history.remove(0);}}
|
||||
ui.separator();
|
||||
match draft.changes(snapshot) {
|
||||
Ok(changes)=>{
|
||||
if ui.add_enabled(!changes.is_empty() && state.pending.is_none() && !self.device.busy(),egui::Button::new("Review input changes")).clicked(){state.review=true;}
|
||||
if state.review {
|
||||
ui.label("These are shared input changes, not a Preview-only layer edit.");
|
||||
for change in &changes {ui.small(format!("{}: {} → {}",change.path.iter().skip(8).cloned().collect::<Vec<_>>().join("/"),change.before,change.after));}
|
||||
if ui.button("Send input settings").clicked(){send=Some(draft.clone());state.review=false;}
|
||||
}
|
||||
if ui.add_enabled(!changes.is_empty() && state.pending.is_none() && !self.device.busy(),egui::Button::new("Send changes")).clicked(){send=Some(draft.clone());}
|
||||
}
|
||||
Err(error)=>{ui.colored_label(theme::palette(ui.ctx()).amber,error);}
|
||||
}
|
||||
|
|
@ -231,7 +224,6 @@ impl Editor {
|
|||
});
|
||||
self.inputs.open = open;
|
||||
if refresh && !self.device.busy() {
|
||||
self.inputs.review = false;
|
||||
self.inputs.reading = true;
|
||||
let (tx, rx) = std::sync::mpsc::channel();
|
||||
self.inputs.pending = Some(rx);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### v0.9.61
|
||||
|
||||
- Removed Crop Finder from shared input settings and replaced the review step with
|
||||
a direct **Send changes** button. Fresh device validation, category protection
|
||||
and verified readback remain in place.
|
||||
|
||||
### v0.9.60
|
||||
|
||||
- Input capture is now a live toggle while Input settings is open, sharing the
|
||||
|
|
|
|||
|
|
@ -317,8 +317,8 @@ additional controls without downloading the complete device store.
|
|||
|
||||
This edits preprocessing shared by every consumer of that input, including
|
||||
Program and layers outside the project. Nothing is sent while dragging, selecting
|
||||
an input, capturing an image or opening the window. Use **Review input changes**,
|
||||
then **Send input settings** to apply the edited fields and verify them.
|
||||
an input, capturing an image or opening the window. Use **Send changes** to apply the edited fields directly, with fresh device
|
||||
validation and verified readback.
|
||||
|
||||
- **Keep device values:** each category has this toggle. Check it to discard that
|
||||
category’s draft edits, disable its controls and leave it untouched when sending.
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ Layer properties link to the relevant input; layer crop, fit, position and masks
|
|||
remain layer-owned. A local editor source ID is never interpreted as a physical
|
||||
input number. Inputs on different connections require different identities.
|
||||
|
||||
Edits remain local drafts until an explicit reviewed Send input settings action.
|
||||
Edits remain local drafts until an explicit **Send changes** action.
|
||||
Changing a selection, opening a project or capturing an image sends no settings.
|
||||
The review explains that an input change affects every device consumer, including
|
||||
The window explains that an input change affects every device consumer, including
|
||||
ones outside this project and potentially Program. No routing or TAKE is implied.
|
||||
|
||||
Reuse the canvas interaction conventions for crop edges, whole-window movement,
|
||||
|
|
|
|||
|
|
@ -298,8 +298,8 @@ change. Persistence and migrations are specified in the
|
|||
`device_inputs::InputDraft` is a transient adapter-specific input/active-plug draft,
|
||||
not a persistent project field. The common window edits native input preprocessing
|
||||
without changing editor sources, layer geometry, routing or preset selection.
|
||||
Only edited fields are sent after fresh signal/plug/settings checks; readback is
|
||||
verified. There is no automatic retry, rollback or preset-apply pulse. Partial
|
||||
**Send changes** sends edited fields directly after fresh signal/plug/settings
|
||||
checks; readback is verified. The input editor does not expose or write Crop Finder. There is no automatic retry, rollback or preset-apply pulse. Partial
|
||||
failures are reported and require refresh. This does not migrate existing source
|
||||
geometry or saved layer-bound input proposals; only their saved data and local geometry compatibility remain.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue