Skip to content

Commit

Permalink
#1097 Fix learn
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Aug 20, 2024
1 parent 24cd217 commit 0012412
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 145 deletions.
9 changes: 6 additions & 3 deletions main/src/application/unit_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,7 @@ impl UnitModel {
self.unit
.borrow_mut()
.set_mapping_which_learns_source(Some(mapping_id));
let cloned_session = session.clone();
when(
self.incoming_msg_captured(
reenable_control_after_touched,
Expand All @@ -1797,9 +1798,7 @@ impl UnitModel {
.borrow()
.mapping_which_learns_source()
.changed_to(None),
)
// We listen to just one message!
.take(1),
),
)
.with(session)
.finally(|session| {
Expand All @@ -1822,6 +1821,10 @@ impl UnitModel {
Rc::downgrade(&shared_session),
|ctx| Ok(ctx.mapping.source_model.apply_from_source(&source)),
);
session
.unit
.borrow_mut()
.set_mapping_which_learns_source(None);
}
}
});
Expand Down
142 changes: 0 additions & 142 deletions resources/main-presets/factory/faders-eq.json

This file was deleted.

0 comments on commit 0012412

Please sign in to comment.