forge
Explore
Log in

Don't you dare go Hollow

The project settings answer before the first file

Browse files at this commit

f30fe4448350338dd87ebe9c8f9d76afb1c6ea39Ahmet Kaan GümüşParent: 97ba514
  • fix
    • the project settings answer before the first file
Show full message
🐛 fix(app): the project settings answer before the first file

The oracle refused ActionId::Resolution with no timeline, so the Size,
Rate and sound-rate rows — the whole pre-import settings surface — were
dim exactly when a pending pick means the most. Joins the editor-wide
always-on list; the no-timeline sweep test now pins it.
crates/app/src/oracle.rsmodified+4 -0
@@ -128,6 +128,10 @@ pub(crate) fn enable(action: ActionId, ctx: Ctx) -> Enable {
128 | ActionId::VolumeDown128 | ActionId::VolumeDown
129 | ActionId::ToggleProxies129 | ActionId::ToggleProxies
130 | ActionId::ToggleAutoProxies130 | ActionId::ToggleAutoProxies
131+ // The project settings decide what the *next* file scaffolds as
132+ // (`Player::pending_settings`), so refusing them before the first
133+ // file was refusing them exactly when they mean the most.
134+ | ActionId::Resolution
131 ) {135 ) {
132 return match ctx.exporting {136 return match ctx.exporting {
133 true => Enable::No("an export is running"),137 true => Enable::No("an export is running"),
crates/app/src/tests/editing.rsmodified+4 -0
@@ -850,6 +850,9 @@ fn the_clip_menu_dims_what_the_playhead_is_not_on_and_stays_in_the_window() {
850 // picture is then decoded from -- so a person answers them before the first850 // picture is then decoded from -- so a person answers them before the first
851 // file, and a switch that waited for one was a switch that came too late to851 // file, and a switch that waited for one was a switch that came too late to
852 // stop the encode it was about.852 // stop the encode it was about.
853+ // ...and so do the project settings: they decide what the next file
854+ // scaffolds as (`pending_settings`), so a gate that waited for a timeline
855+ // refused them exactly when they mean the most.
853 for editor_wide in [856 for editor_wide in [
854 ActionId::ToggleSnap,857 ActionId::ToggleSnap,
855 ActionId::ToggleMute,858 ActionId::ToggleMute,
@@ -857,6 +860,7 @@ fn the_clip_menu_dims_what_the_playhead_is_not_on_and_stays_in_the_window() {
857 ActionId::VolumeDown,860 ActionId::VolumeDown,
858 ActionId::ToggleProxies,861 ActionId::ToggleProxies,
859 ActionId::ToggleAutoProxies,862 ActionId::ToggleAutoProxies,
863+ ActionId::Resolution,
860 ] {864 ] {
861 assert!(865 assert!(
862 whole(editor_wide, Ctx::default()).yes(),866 whole(editor_wide, Ctx::default()).yes(),