fix deadlock caused by not unlocking TempoMap when not finishing a meter-marker-drag

This commit is contained in:
Paul Davis 2021-01-04 21:57:59 -07:00
parent 7ec5af0b60
commit b0b346c4ac
1 changed files with 3 additions and 2 deletions

View File

@ -353,8 +353,7 @@ Editor::mouse_add_new_meter_event (timepos_t pos)
return;
}
TempoMap::SharedPtr map (TempoMap::write_copy());
MeterDialog meter_dialog (map, pos, _("add"));
MeterDialog meter_dialog (TempoMap::use(), pos, _("add"));
switch (meter_dialog.run ()) {
case RESPONSE_ACCEPT:
@ -363,6 +362,8 @@ Editor::mouse_add_new_meter_event (timepos_t pos)
return;
}
TempoMap::SharedPtr map (TempoMap::write_copy());
double bpb = meter_dialog.get_bpb ();
bpb = max (1.0, bpb); // XXX is this a reasonable limit?