Skip to content

Commit

Permalink
Playtime: Push track list changes
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Sep 10, 2023
1 parent 630a835 commit 2a6843d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions main/src/application/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub trait SessionUi {
&self,
session: &Session,
matrix: &playtime_clip_engine::base::Matrix,
event: &reaper_high::ChangeEvent,
events: &[reaper_high::ChangeEvent],
);
fn mapping_matched(&self, event: MappingMatchedEvent);
fn target_controlled(&self, event: TargetControlEvent);
Expand Down Expand Up @@ -2630,9 +2630,9 @@ impl DomainEventHandler for WeakSession {
s.ui.clip_matrix_changed(&s, matrix, events, is_poll);
}
#[cfg(feature = "playtime")]
ControlSurfaceChangeEventForClipEngine(matrix, event) => {
ControlSurfaceChangeEventsForClipEngine(matrix, events) => {
let s = session.try_borrow()?;
s.ui.process_control_surface_change_event_for_clip_engine(&s, matrix, event);
s.ui.process_control_surface_change_event_for_clip_engine(&s, matrix, events);
}
MappingMatched(event) => {
let s = session.try_borrow()?;
Expand Down
4 changes: 2 additions & 2 deletions main/src/domain/eventing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ pub enum DomainEvent<'a> {
is_poll: bool,
},
#[cfg(feature = "playtime")]
ControlSurfaceChangeEventForClipEngine(
ControlSurfaceChangeEventsForClipEngine(
&'a playtime_clip_engine::base::Matrix,
&'a reaper_high::ChangeEvent,
&'a [reaper_high::ChangeEvent],
),
TimeForCelebratingSuccess,
ConditionsChanged,
Expand Down
8 changes: 3 additions & 5 deletions main/src/domain/main_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1743,11 +1743,9 @@ impl<EH: DomainEventHandler> MainProcessor<EH> {
// Let matrix react to track changes etc.
matrix.process_reaper_change_events(events);
// Process for GUI
for event in events {
self.basics.event_handler.handle_event_ignoring_error(
DomainEvent::ControlSurfaceChangeEventForClipEngine(matrix, event),
);
}
self.basics.event_handler.handle_event_ignoring_error(
DomainEvent::ControlSurfaceChangeEventsForClipEngine(matrix, events),
);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions main/src/infrastructure/ui/main_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,11 @@ impl SessionUi for Weak<MainPanel> {
&self,
session: &Session,
matrix: &playtime_clip_engine::base::Matrix,
event: &reaper_high::ChangeEvent,
events: &[reaper_high::ChangeEvent],
) {
App::get()
.clip_engine_hub()
.send_occasional_matrix_updates_caused_by_reaper(session.id(), matrix, event);
.send_occasional_matrix_updates_caused_by_reaper(session.id(), matrix, events);
}

fn mapping_matched(&self, event: MappingMatchedEvent) {
Expand Down

0 comments on commit 2a6843d

Please sign in to comment.