diff --git a/src/app.rs b/src/app.rs index f510bff..f39baf6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -199,10 +199,12 @@ impl eframe::App for EmApp { |sel| { format!( "[{}s,{}s)/{}s", - Duration::from_micros(sel.from as u64).as_secs(), - Duration::from_micros(sel.to as u64).as_secs(), - Duration::from_micros(sel.length().abs() as u64) - .as_secs() + Duration::from_micros(sel.start as u64).as_secs(), + Duration::from_micros(sel.end as u64).as_secs(), + Duration::from_micros( + (sel.end - sel.start).abs() as u64 + ) + .as_secs() ) }, ), diff --git a/src/main.rs b/src/main.rs index 1d7b62a..847a30c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,6 @@ mod midi_vst; mod project; mod stave; mod track; -mod track_edit; mod track_history; mod track_source; mod util; diff --git a/src/stave.rs b/src/stave.rs index 8540c90..5c6f9d9 100644 --- a/src/stave.rs +++ b/src/stave.rs @@ -19,7 +19,6 @@ use crate::edit_commands::{ use crate::track::{ export_smf, EventId, Level, Pitch, Track, TrackEvent, TrackEventType, MIDI_CC_SUSTAIN_ID, }; -use crate::track_edit::TimeSelection; use crate::track_history::TrackHistory; use crate::{util, Pix}; @@ -45,7 +44,7 @@ fn key_line_ys(view_y_range: &Rangef, pitches: Range) -> (BTreeMap, pitch: Pitch, } @@ -142,7 +141,7 @@ pub struct Stave { pub cursor_position: Time, pub bookmarks: Bookmarks, - pub time_selection: Option, + pub time_selection: Option>, pub note_draw: Option, pub note_selection: NotesSelection, } @@ -220,10 +219,7 @@ impl Stave { ); } - const NOTHING_ZONE: TimeSelection = TimeSelection { - from: Time::MIN, - to: 0, - }; + const NOTHING_ZONE: Range